Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to do port forwarding: socat not found. Kubernetes on Docker

I'm running a dev kubernetes cluster on Docker Machine with GCE as provider. Cluster was setup using this tutorial: https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/docker.md. Everything's working fine except when I try to do port-forward. I get:

E1104 00:58:23.210982   18552 portforward.go:310] An error occurred forwarding 650 -> 650: Error forwarding port 650 to pod pfsd-rc-7xrq1_default, uid : Unable to do port forwarding: socat not found.
I1104 00:58:23.220147   18552 portforward.go:251] Handling connection for 650
E1104 00:58:23.480593   18552 portforward.go:310] An error occurred forwarding 650 -> 650: Error forwarding port 650 to pod pfsd-rc-7xrq1_default, uid : Unable to do port forwarding: socat not found.
I1104 00:58:23.481531   18552 portforward.go:251] Handling connection for 650
E1104 00:58:23.851200   18552 portforward.go:310] An error occurred forwarding 650 -> 650: Error forwarding port 650 to pod pfsd-rc-7xrq1_default, uid : Unable to do port forwarding: socat not found.
I1104 00:58:23.852122   18552 portforward.go:251] Handling connection for 650

I've tried installing locally, on the GCE machine and inside the container and nothing did the trick. Anyone else hit this?

like image 760
Joe Doliner Avatar asked Nov 04 '15 09:11

Joe Doliner


2 Answers

It's a bit late but still, I think it will be helpful for other people.

It says socat isn't installed. Running apt-get -y install socat on the host machine resolves the problem. It worked for me.

like image 111
Rewanth Tammana Avatar answered Oct 01 '22 11:10

Rewanth Tammana


This was a bug with socat not being include in the kubelet container. It's now fixed.

Release 1.1.2 is the first one to include the fix.

like image 40
Joe Doliner Avatar answered Oct 01 '22 12:10

Joe Doliner