Kubernetes @ Local

I tried out the latest version of Rancher Server (v.0.63.0) and did setup a Kubernetes environment in my localhost. Steps I followed to make it to this level.

  1. Installed docker-engine(1.10.3) on Ubuntu (15.10) Gnome OS.
  2. Ran sudo docker run -d --restart=always -p 8080:8080 rancher/server:v0.63.0
  3. Create a new environment selecting kubernetes as the cluster manager.
  4. Added my local machine as the host using following command.
    sudo docker run -d --privileged -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/rancher:/var/lib/rancher rancher/agent:v0.10.0

I’ve got every other service getting started except kubelet on my machine. It fails and keeps rotating… Following are the logs I keep getting from the kubelet container…

time="2016-03-15T06:46:53Z" level=info msg="Execing [/usr/bin/nsenter --mount=/proc/852/ns/mnt -F -- /var/lib/docker/aufs/mnt/e36abfcf183748db4f32118880a321f9e33217b48799d42261f2616a5e3759d1/usr/bin/share-mnt --stage2 /var/lib/kubelet /sys -- kubelet --api_servers=http://master --allow-privileged=true --register-node=true --cloud-provider=rancher --healthz-bind-address= --cluster-dns= --cluster-domain=cluster.local]" 15/03/2016 06:46:53W0315 06:46:53.740971 32447 server.go:431] Could not load kubeconfig file /var/lib/kubelet/kubeconfig: stat /var/lib/kubelet/kubeconfig: no such file or directory. Trying auth path instead. 15/03/2016 06:46:53W0315 06:46:53.741019 32447 server.go:392] Could not load kubernetes auth path /var/lib/kubelet/kubernetes_auth: stat /var/lib/kubelet/kubernetes_auth: no such file or directory. Continuing with defaults. 15/03/2016 06:46:53I0315 06:46:53.976165 32447 server.go:664] Watching apiserver 15/03/2016 06:46:53I0315 06:46:53.978358 32447 kubelet.go:363] Hairpin mode set to true 15/03/2016 06:46:54I0315 06:46:54.117256 32447 manager.go:196] Setting dockerRoot to /var/lib/docker 15/03/2016 06:46:54I0315 06:46:54.216615 32447 plugins.go:56] Registering credential provider: .dockercfg 15/03/2016 06:46:54I0315 06:46:54.218087 32447 server.go:626] Started kubelet 15/03/2016 06:46:54E0315 06:46:54.218214 32447 server.go:347] Starting health server failed: listen tcp bind: address already in use 15/03/2016 06:46:54I0315 06:46:54.218751 32447 server.go:108] Starting to listen on 15/03/2016 06:46:54F0315 06:46:54.219385 32447 server.go:133] listen tcp bind: address already in use

Did anyone else bump into the same issue (or) am I doing anything wrong here…?

I wonder if it makes any sense at all to use Rancher and Kubernetes together. I know it may be possible same with Deis and even with Apache Mesos and so on… but, I do not think it is a good idea.

Anyone has different thoughts ?

You will need to use v0.63.1 if you are running Ubuntu 15.10. There was an issue with k8s and systemd based OS on v0.63.0

I defer on your opinion a bit here. Rancher and Kubernetes solve different problems. If you are making a comparison between Cattle vs Kubernetes vs Swarm, it calls for a debate. Again it is all upto individual’s opinion.

Thanks for the info. I’ll give it a try and post the results.

Thank you denise, worked like a charm… v0.63.1 did solve the problem for me… Now I’m able to start kubernetes @ local… Great… :slight_smile: