Port-forwarding not working in containerized hyperkube due to missing socat command #17157

Closed
2opremio opened this Issue Nov 12, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@2opremio
Contributor

2opremio commented Nov 12, 2015

When trying to use kubectl port-forward against a containerized kubernetes cluster (i.e. deployed following https://github.com/kubernetes/kubernetes/blob/master/docs/getting-started-guides/docker.md ) I get the following errors:

$ kubectl port-forward fons-proxy-ksts5 8000:8000 8080:8080
I1112 12:23:59.888110   53302 portforward.go:213] Forwarding from 127.0.0.1:8000 -> 8000
I1112 12:23:59.888315   53302 portforward.go:213] Forwarding from [::1]:8000 -> 8000
I1112 12:23:59.888365   53302 portforward.go:213] Forwarding from 127.0.0.1:8080 -> 8080
I1112 12:23:59.888423   53302 portforward.go:213] Forwarding from [::1]:8080 -> 8080
I1112 12:24:13.166791   53302 portforward.go:247] Handling connection for 8000
I1112 12:24:13.168963   53302 portforward.go:247] Handling connection for 8000
I1112 12:24:13.171131   53302 portforward.go:247] Handling connection for 8000
I1112 12:24:13.171192   53302 portforward.go:247] Handling connection for 8000
I1112 12:24:13.171193   53302 portforward.go:247] Handling connection for 8000
I1112 12:24:13.171888   53302 portforward.go:247] Handling connection for 8000
E1112 12:24:13.233818   53302 portforward.go:318] an error occurred forwarding 8000 -> 8000: error forwarding port 8000 to pod fons-proxy-ksts5_default, uid : unable to do port forwarding: socat not found.
E1112 12:24:13.236034   53302 portforward.go:318] an error occurred forwarding 8000 -> 8000: error forwarding port 8000 to pod fons-proxy-ksts5_default, uid : unable to do port forwarding: socat not found.
E1112 12:24:13.236272   53302 portforward.go:318] an error occurred forwarding 8000 -> 8000: error forwarding port 8000 to pod fons-proxy-ksts5_default, uid : unable to do port forwarding: socat not found.
E1112 12:24:13.236404   53302 portforward.go:318] an error occurred forwarding 8000 -> 8000: error forwarding port 8000 to pod fons-proxy-ksts5_default, uid : unable to do port forwarding: socat not found.
E1112 12:24:13.236489   53302 portforward.go:318] an error occurred forwarding 8000 -> 8000: error forwarding port 8000 to pod fons-proxy-ksts5_default, uid : unable to do port forwarding: socat not found.
E1112 12:24:13.236528   53302 portforward.go:318] an error occurred forwarding 8000 -> 8000: error forwarding port 8000 to pod fons-proxy-ksts5_default, uid : unable to do port forwarding: socat not found.
I1112 12:24:13.321342   53302 portforward.go:247] Handling connection for 8000
E1112 12:24:43.322896   53302 portforward.go:258] error creating error stream for port 8000 -> 8000: Timeout occured

This is simply because the socat command is missing in the hyperkube container image. I will be creating a PR with a fix shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment