What does this command do?
kubectl port-forward pod/web 8080:80
- Exposes the pod publicly on port 8080
- Tunnels local port 8080 to pod port 80
- Changes the pod's container port to 8080
- Creates a Service that maps 8080 to 80
It opens a temporary tunnel from your machine to the pod, handy for debugging without exposing anything.
Play DevOps ▸