Error for kubectl Port Forwarding ​
Symptom ​
When executing kubectl port-forward, you get the following error:
bash
Unable to listen on port ... bind: address already in useCause ​
Port forwarding failed because the local port is already reserved by another process running on your machine.
Remedy ​
There are several ways to fix this:
- Kill the other process listening on the same port.
- Choose another (unused) local port.
- Let
kubectlchoose a random unused local port for you (see the Kubernetes port forwarding documentation).