Port forward to Pods
- Port Forward local connections to Pods running in a cluster
Connect to ports of Pods running a cluster by port forwarding local ports.
Forward Multiple Ports
Listen on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod
kubectl port-forward pod/mypod 5000 6000
One can also perfrom operations such as, Port Forward to:
- Pod in a Workload
- Different Local and Remote Ports
- Random Local Port
Command / ExamplesCheck out the reference for commands and examples of
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.