kubernetes/port-forward

Port Forward

Forward local port to pod

network
debugging

Command

kubectl port-forward <pod-name> <local>=<remote>

Explanation

Routes traffic from local port to a pod port.

Examples

Access pod webserver locally

kubectl port-forward my-pod 8080:80