Skip to content
masterclass Buddy

Kubernetes · Command

kubectl port-forward

Forward one or more local TCP ports to a selected Kubernetes pod. You can select the pod directly or through a Deployment, ReplicaSet, or Service.

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 logs

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