"Running Kubernetes Locally via Docker" Guide is not working at all for MacOS, ssh command just hanging

5/1/2016

I am following this Guide at http://kubernetes.io/docs/getting-started-guides/docker/ to start using Kubernetes on MacOS. Is this guide valid?

When I am doing this step:

docker-machine sshdocker-machine active-N -L 8080:localhost:8080

They command is hanging, no repsponse at all;

Looking at docker ps -l, I have

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b1e95e26f46d gcr.io/google_containers/hyperkube-amd64:v1.2.3 "/hyperkube apiserver" About an hour ago Up About an hour k8s_apiserver.c08c1df_k8s-master-127.0.0.1_default_d95a6048198f747c5fcb74ee23f1f25c_d0c6d2fc

So it means kubernete is running

I run this command:

docker-machine `sshdocker-machine active` -L 8080:localhost:8080

I can login to docker machine, then exit, run kubectl get nodes again, hanging, no response

Anything wrong here? If this step can not pass, how can I use Kubernetes?

-- user3006967
docker
kubernetes

1 Answer

5/4/2016

"docker-machine ssh docker-machine active -N -L 8080:localhost:8080" sets up a ssh tunnel. Similar to ssh tunnel, you can run that command in the background by passing the -f option. More useful tips here

I'd recommend running the ssh command in a separate terminal, so that it will be easy to bring down the tunnel. As long as the above command is running, kubectl should work.

-- Vishnu Kannan
Source: StackOverflow