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 perfrom operations such as, Port Forward to:
- Pod in a Workload
- Different Local and Remote Ports
- Random Local Port
Command / Examples
Check out the reference for commands and examples of port forwarding
当前内容版权归 kubernetes官网 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 kubernetes官网 .