How to install kubernetes cluster on Rancher cluster?

5/15/2017

Use Rancher server on several servers:

  • Master
  • Node1
  • Node2
  • Node3

Maybe only need rancher agent on node servers.

Also want to make kubernetes cluster on these servers. So install Kubernetes master on Rancher master, install Kubernetes nodes(kubelet) on Rancher nodes. Is it right?

So, the Kubernetes nodes can't install using Rancher server but should do it by self?

-- cloud_cloud
kubernetes
rancher

1 Answer

5/15/2017

You will need a Rancher Agent on any server you want Rancher to place containers on. Rancher can deploy Kubernetes for you. I believe what you want to do is add all of the nodes, including the Rancher master, to a single Cattle environment(The Default env is Cattle). When adding the Rancher Server make sure you set CATTLE_AGENT_IP=. Once the hosts are registered, you will want to set host labels on the nodes. For nodes 1,2,3 you will set the label compute=true. On the Rancher Server you will set host 2 host labels, etcd=true and orchestration=true.

Once the labels are set up. Click on Catalog and search for Kubernetes. You can probably stick with most defaults, but CHANGE plane isolation to required.

Rancher should deploy Kubernetes management servers on the same host as your Rancher Server and the remaining nodes will be Kuberenetes minions.

-- Bill Maxwell
Source: StackOverflow