Requirements
- 1 Latitude.sh server for Rancher
- 3 Latitude.sh servers for the cluster
- Kubectl and helm installed on your local machine for managing the cluster
Let’s get started
We have tried and tested most Kubernetes services, control planes and distributions. Rancher RKE2 has been one of the best to work with. It is intuitive, easy to use, and has a great community. It’s the distribution we run our production clusters on. If security and performance are important to you, RKE2 is a decent option. RKE2 is a CNCF-certified Kubernetes distribution that is secure by default and has a small footprint. It will set up a conformant cluster you can start using in minutes. More importantly, it is easy to maintain and upgrade. While the Rancher server is lightweight, it is important to run it on a separate server to avoid conflicts and issues during setup and later on.Install Rancher
The first thing we will do is set up the Rancher server. This server will be used to manage your Kubernetes clusters.1
Initial setup
Go to the Latitude.sh console and create one server with Ubuntu 24.04. A server with 16GB of RAM is enough.
2
Install k3s on the Rancher server
SSH into the server and run the following command.
Version 1.28 is the latest supported version as of this writing.
3
Setup kubectl on your local machine
Copy the contents of On your local machine, create a new file (e.g., Open the terminal and set the Verify that you can access the Rancher server by running
/etc/rancher/k3s/k3s.yaml
.rke2-kubeconfig.yaml
) and paste the contents of the k3s.yaml
file into it.Update the server URL in the kubeconfig file to point to the Rancher server’s IP address. Leave the IP URL with HTTPs and port 6443.KUBECONFIG
environment variable to point to the location of your kubeconfig file:Add to your shell profile file (e.g., ~/.bashrc or ~/.zshrc) to make it
persistent across terminal sessions.
kubectl get nodes
. It should display the node of your Rancher cluster, similar to the following:4
Install Rancher with Helm
To proceed, you will need to have kubectl and helm installed on your local machine.From your local terminal, run the following commands.We are now ready to install Rancher. Rancher requires a domain name to forward traffic to the Rancher server. For the sake of simplicity, we will use sslip.io, a fake domain name that doesn’t require any setup.Go to 
cert-manager v1.15.1 is the latest version as of this writing. Go to
https://github.com/cert-manager/cert-manager/releases to find the latest
version.
https://<IP_OF_SERVER>.sslip.io
and log in with the password you have set for the Rancher admin user. You should see the following screen:
Rancher takes a few minutes to initialize. Don’t worry if you see a 404 error when you access the domain. Just wait a little longer.
Create the K8s cluster
Choose your adventure 👇1
Create 3 servers
Create three more servers in the same location of the Rancher server.
2
Create the cluster
From the Rancher UI, click on Create then select the Custom option. Set a name for your cluster and click Create. You don’t need to change any of the other settings. You can always come back and change them later.On the cluster registration page, leave
etcd
, Control Plane
, and Worker
checked. Click on Show Advanced, select one of the servers you created for the cluster, and add its hostname and public IP.Bonus: If you want cluster communication through a private network, set up a private network and add the private IP under Node Private IP.In Step 3, as we are using a self-signed certificate, check the Insecure option. If you set up your domain with TLS, leave insecure unchecked.Copy the registration command and run it on the first server, the same server you used to install Rancher. You should see it being registered.Repeat the same process for the other two servers. You can run different roles on different servers. For example, you can run etcd
and Control Plane
on one server and Worker
on the other two.3
That's it
It takes a few minutes for nodes to join the cluster. When the process is complete, your cluster’s state will be Active. From there you can download the kubeconfig file and use it to access the cluster.
Go to your new cluster on the sidebar and start using it.

