Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: Add socat as a pre-requisite #17

Open
Matty9191 opened this issue Feb 3, 2018 · 2 comments
Open

Documentation: Add socat as a pre-requisite #17

Matty9191 opened this issue Feb 3, 2018 · 2 comments

Comments

@Matty9191
Copy link

Hello folks,

Loved the book and have found kuard super useful for testing. I bumped into an issue this morning when I tried to create a port-forward to kuard:

$ kubectl port-forward kuard 8080:8080
Forwarding from 127.0.0.1:8080 -> 8080
Handling connection for 8080
E0203 14:12:54.651409 20574 portforward.go:331] an error occurred forwarding 8080 -> 8080: error forwarding port 8080 to pod febaeb6b4747d87036534845214f391db41cda998a592e541d4b6be7ff615ef4, uid : unable to do port forwarding: socat not found.

I poked around the kubelet code and it looks like it needs it runs the socat binary to port forward connections:

https://github.com/kubernetes/kubernetes/blob/master/pkg/kubelet/dockershim/docker_streaming.go

 containerPid := container.State.Pid
    socatPath, lookupErr := exec.LookPath("socat")
    if lookupErr != nil {
            return fmt.Errorf("unable to do port forwarding: socat not found.")
    }

I also grep'ed through the repo files and I don't see any notes about socat being a pre-requisite. Would it be possible to note that each Kubernetes worker needs the socat binary installed in a pre-requisite section (I'll be glad to submit a documentation PR)? If this is documented elsewhere my apologies.

@jbeda
Copy link
Member

jbeda commented Feb 5, 2018

Hey @Matty9191 -- yes -- it looks like socat needs to be present. I haven't hit this before personally but it looks like it is a long standing issue.

kubernetes/kubernetes#19765

Not sure what we can do from the kuard side.

I'd like to see this go into the conformance tests but it isn't right now. This should be part of cluster conformance though.

@Matty9191
Copy link
Author

Hey Joe,

The conformance tests sound like a great place to stick this. I just wanted to share this piece of information so others reading the book and experimenting with kuard didn't bump into this issue.

Hope you are having a great day!

  • Ryan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants