I'm trying to get Kubernetes running on OSX.

I've downloaded and installed Docker Toolbox and have followed the instructions here.

When I try to run kubectl get nodes I get the following error:

error: couldn't read version from server: Get http://localhost:8080/api: dial tcp connection refused

I noticed that the guide has a note for OSX but it is for boot2docker which has been deprecated in favor of Docker Toolbox.

Any ideas how I can get this working?


Found the answer in a pull request on github.

This is for docker-machine version .4

docker-machine env default
ssh -f -T -N -L8080:localhost:8080 -l docker $(echo $DOCKER_HOST | cut -d ':' -f 2 | tr -d '/')

Type tcuser as the password.

You should now be able to successfully run kubectl get nodes

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.