Rancher HA setup

Quick question about a Rancher HA setup. Say I’ve got 10 nodes and I setup three of them with Rancher in an HA configuration. So now I’ve basically got a three node kubernetes cluster dedicated to running Rancher. If I provision the remaining 7 nodes does that get setup as a separate kubernestes cluster with its own etcd and controlplane or would they just be additional worker nodes to the three nodes running Rancher?

You can do either, add more nodes to the “Local” cluster that comes with HA or make new separate ones which will then have their own etcd/control/workers.

But you generally should dedicate the Local cluster to just that and create separate a one (or more) for your workloads. The Rancher cluster contains the CRDs that control who has access to everything, so accidentally giving someone too much access to it can allow someone to escalate their own privilege. And a workload overloading its cluster causes additional headache if that cluster is the one that is also running the management plane.

1 Like

If the cost of dedicating a few nodes to management is a problem, then I would say to consider if you really need HA. Individual clusters continue to run fine and serve traffic on their own even if the management plane falls off the earth.

So HA is really needed for “we’re a large company and if the dashboard is down dozens of people can’t get their work done and the sky is falling”.

If you’re an individual or a small company, then it is definitely simpler and can be more pragmatic to run the single container and just take regular backups and/or write to HA storage (e.g. an EBS volume). Occasionally the VM will catch on fire or Amazon will retire that hypervisor or whatever, and the control panel will go down. So someone calls up the guy that set it up and he spins up a new one from the last backup and you’re back up.

2 Likes

Thanks for the detailed response. It’s much clearer now.

As a small startup, this defines our situation. We have 3 individual servers with applications deployed using docker-compose. Now we are planning to move towards K8’s and tested Rancher with single node setup. But the HA setup became a hurdle due to dedicated nodes for Rancher server. Can you define the Individual cluster in brief? Should we run each node as a master node + worker node?

If you have 3 nodes and don’t need HA, then you’d:

  • Run the single container (docker run ...rancher/rancher) on one of them
  • Make up a DNS entry (e.g. rancher.mycompany.com) and point that at the IP of the one running the container
  • Set the server-url to that DNS name when first logging in (so that you can change where the name points if the node it’s going to dies).
  • Save the state onto some disk that survives any individual node if possible (e.g. an EBS volume in Amazon), or back up regularly.
  • Login and make a custom cluster inside of rancher which consists of those 3 nodes as etcd+controlplane+worker and use that for your applications.