简体   繁体   中英

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?

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.

What image did you use for the virtual machine? If you use the container VM image , it already has socat installed.

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.

The error clearly says " socat not found ". So we need to install it(SOcket CAT), here I'm using a Ubuntu. So it can be install with apt install socat .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM