This is a record of my 2021 RKE1 setup with Kubernetes 1.20.11. RKE1 reached end of life on July 31, 2025; for a new cluster, follow the current RKE2 documentation. The lifecycle notice is documented by Rancher.
Why I used RKE1 for this cluster
RKE1 fit that environment because it let me manage cluster components through one configuration. Upgrades were harder to coordinate across the Ubuntu 20.04.3 LTS and CentOS 7 servers; RKE1 reduced some of those differences by running Kubernetes services in Docker.
RKE1 also configured each node over SSH, so I did not have to join workers manually from the control-plane node.
This is an example RKE cluster.yml configuration.
nodes:
- address: 192.168.1.109
user: node
role:
- controlplane
- etcd
- worker
- address: 192.168.1.105
user: node
role:
- worker
ssh_key_path: /home/node/.ssh/udoo
labels:
app: ingress
cluster_name: mycluster
ignore_docker_version: false
ssh_key_path: /home/node/.ssh/rke_rsa
ssh_cert_path: /home/node/.ssh/rke_rsa.pub
kubernetes_version: "v1.20.11-rancher1-2"
ingress:
provider: nginx
network_mode: hostPort
http_port: 8888
https_port: 9999
node_selector:
app: ingress
private_registries:
- url: registry.DOMAIN_NAME
user: USER_NAME
password: USER_PASSWORD
is_default: false
192.168.1.109: control plane, etcd, and worker.192.168.1.105: worker and ingress.
Ingress runs on 192.168.1.105.
Download the RKE binary for this environment
- Build the cluster.
Make sure cluster.yml is in the same directory as the RKE binary. RKE runs on most Linux distributions with Docker installed.
Reference: general-linux-requirements
$ ./rke up
INFO[0000] Building Kubernetes cluster
...
INFO[0101] Finished building Kubernetes cluster successfully
- After RKE initializes the cluster, use the generated kubeconfig to connect with kubectl.
$ cp kube_config_cluster.yml ~/.kube/config
By default, kubectl reads ~/.kube/config. Use --kubeconfig to specify a different path. For example:
kubectl --kubeconfig /custom/path/kube.config get pods
- Check node status.
➜ $ kubectl get node
NAME STATUS ROLES AGE VERSION
192.168.1.105 Ready worker 36d v1.20.11
192.168.1.109 Ready controlplane,etcd,worker 36d v1.20.11
