FahamLah

Commands

kubectl port-forward

kubectl port-forward <pod|svc/name> <local>:<remote>

Risk: Safe

What it does

Opens a private tunnel from your laptop to one pod.

When to use it

To try an app from your browser without opening it to the world.

Example

$ kubectl port-forward svc/shop 8080:80

localhost:8080 now reaches a shop pod.