kubectl port-forward
NetworkingForward local port to pod
Examples
Common usage examples
Forward local 8080 to pod 80
kubectl port-forward mypod 8080:80Forward to service
kubectl port-forward svc/myservice 8080:80Forward to deployment
kubectl port-forward deploy/myapp 8080:80Listen on all interfaces
kubectl port-forward mypod 8080:80 --address 0.0.0.0Notes
- Useful for debugging services locally
Related Commands
You might also find these useful