============= prerequisites ============= kubernetes ^^^^^^^^^^ I am using rke2 for k8s. Follow the rke2 directions, not these. Their directions will be up to date. Install the server ^^^^^^^^^^^^^^^^^^ .. code-block:: console curl -sfL https://get.rke2.io | sh - systemctl enable rke2-server systemctl start rke2-server Make sure to setup the environment variables to make things easier: .. code-block:: console export PATH="${PATH}:/var/lib/rancher/rke2/bin:/var/lib/rancher/rke2/bin" export KUBECONFIG=/etc/rancher/rke2/rke2.yaml Install the agents ^^^^^^^^^^^^^^^^^^ .. code-block:: console curl -sfL https://get.rke2.io | INSTALL_RKE2_TYPE="agent" sh - systemctl enable rke2-agent mkdir -p /etc/rancher/rke2/ vim /etc/rancher/rke2/config.yaml systemctl start rke2-agent Contents of the rke2/config.yaml ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I'm using the external (instead of the management) IP of the server node. .. code-block:: console server: https://:9345 token: Assign role to worker nodes ^^^^^^^^^^^^^^^^^^^^^^^^^^^ Run this from the server node. .. code-block:: console kubectl label node NODE_NAME node-role.kubernetes.io/worker=worker Remove a role from a node ^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: console kubectl label node NODE_NAME node-role.kubernetes.io/worker- Get an alpine linux container ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This will give you a shell prompt to test stuff. .. code-block:: console kubectl run -it --tty --rm debug --image=alpine --restart=Never -- sh