Port forwarding
Forward a container port to localhost in one click, save the forwards you use every day, and have them start with the context.
Forward a port
- Open a pod. Its overview has a Port Forwarding section with one row per port the containers declare.
- The local port is pre-filled with the container port. Change it if that port is taken on your machine.
- Click Forward.
The row now shows localhost:<port> — click it to open http://localhost:<port> in your browser — and a Stop button.
A pod that declares no ports shows No ports defined. Forwards are started from pods; to reach a Service, forward a port of one of the pods behind it.
Save a forward
Click the bookmark on an active forward to save it. A saved forward:
- targets the workload that owns the pod — the Deployment, StatefulSet or DaemonSet — rather than the pod itself, so it still works after the pod is replaced;
- reconnects on its own when the pod goes away, retrying up to eight times with growing pauses;
- belongs to the context you saved it in.
Click the bookmark again to forget it.
The Port Forwards view
Open it from Network → Port Forwards in the sidebar, or click the forward counter in the status bar.
- Saved forwards — each with its target, its ports and its state, and the buttons Start, Stop, Open, Retry after an error, and a bin to forget it. Turn Auto on and the forward starts every time this context connects — when you launch the app or switch to it.
- Active forwards — everything running now, with Save, Open and Stop. Double-click a cell to copy its value.
Good to know
- Active forwards stop when you switch context or namespace, and when you quit. Saved forwards with Auto on come back by themselves.
- Open always uses
http://. For anything else, copy the port and use your own client. - You need the
pods/portforwardpermission in the namespace.