liveBook · Manning

Kubectl port-forward

Also called port-forward command

kubectl port-forward is a Kubernetes command that forwards connections from local ports to ports on pods or other Kubernetes resources.

How 2 Manning books explain it

Kubernetes in Action, Second Edition

kubectl port-forward is a kubectl operation that forwards traffic from a local port to a port on a Kubernetes resource such as a pod.

How it is used
Supports local development and troubleshooting by proxying requests to applications running in pods.
How deep it goes
Explains commands, local responses, multi-port forwarding, and the proxy path through cluster components.
Examples
Uses Kiada pod requests, localhost curl commands, and HTTP, HTTPS, and administration ports in a multi-container pod.
What you can do after
Apply it via kubectl to access pod or service ports locally and test application responses with curl or a browser.

Read how Kubernetes in Action, Second Edition explains kubectl port-forward →

Learn Docker in a Month of Lunches, Second Edition

kubectl port-forward is a kubectl command that forwards local network traffic to a port on a Kubernetes Pod or other resource.

How it is used
Uses a local network path to test or debug a Pod that is otherwise unreachable from outside the Kubernetes cluster.
How deep it goes
Explains the traffic path and demonstrates one command, but stops short of detailed forwarding internals.
Examples
Demonstrates forwarding localhost:8015 to numbers-api port 80 and browsing to /rng.
What you can do after
Operate/configure kubectl port-forward to reach and debug a Pod through a local browser.

Read how Learn Docker in a Month of Lunches, Second Edition explains kubectl port-forward →

Also covered in

What to know first

Related concepts

Questions about kubectl port-forward

What is kubectl port-forward?

kubectl port-forward is a Kubernetes command that forwards connections from local ports to ports on pods or other Kubernetes resources.

Which Manning books explain kubectl port-forward?

Kubernetes in Action, Second Edition and Learn Docker in a Month of Lunches, Second Edition.

What should I know before learning kubectl port-forward?

Manning books that teach kubectl port-forward usually introduce YAML first.

What is kubectl port-forward a kind of?

Kubectl port-forward is a kind of port forwarding. Port forwarding is a networking technique that redirects traffic from a port on one endpoint to a port or service on another endpoint.

What is kubectl port-forward also called?

Kubectl port-forward is also called port-forward command.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.