Port forward to Pods
Port forward to Pods
TL;DR
- Port Forward local connections to Pods running in a cluster
Port Forward
Motivation
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
Operations
One can also perform operations such as, Port Forward to:
- Pod in a Workload
- Different Local and Remote Ports
- Random Local Port
Feedback
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.
Last modified February 18, 2023: Fix some small doc typos (31e6c04)