Skip to content
masterclass Buddy

DevOps · Command

kubectl port-forward

kubectl port-forward sends TCP traffic from one or more local ports to a selected pod. You can choose a fixed local port or let kubectl allocate one.

Last updated

Syntax

kubectl port-forward TYPE/NAME [options] [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N]

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • kubectl
  • kubectl proxy
  • kubectl exec
  • kubectl get
  • kubectl apply

Source: kubectl port-forward | Kubernetes. Checked 2026-11-03.