kubectl port-forward
SafePort-forward
kubectl port-forward <pod> <local>:<remote> -n <ns>
Forwards an in-cluster pod/service to a local port for testing.
Examples
kubectl port-forward svc/web 8080:80 -n prodForward to localhost:8080
Syntax
kubectl port-forward <pod|svc> <local>:<remote> -n <ns>
Before you run it
Temporary tunnel; Ctrl+C to stop.
Used when you see
Related commands
- kubectl get svcList services
- kubectl execExec into a pod
The same reference, with no signal at all
Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store