rke2

Installs and configures RKE2 Kubernetes distribution.

Use it on boxctl

  1. On the dashboard, pick rke2 in the Template picker and click Boot box.
  2. The box boots, then runs rke2/rke2.sh on itself. The button reads Booting… until the script has finished.
  3. Open the box's Terminal and follow the guide below. The box's row keeps a link back to this page under the template's name.

The guide is shared with the onctl CLI, so it starts from an onctl up -a rke2/rke2.sh command. Booting a box with this template replaces that command; everything the guide runs on the VM itself applies as written.


Rancher RKE2 installation on-demand

onctl up -n rke2 -a rke2/rke2.sh --download /tmp/rke2.yaml

This will create the vm, install k3s and download the kubeconfig file to you local. Then;

onctl ssh rke2 

You can directly ssh to the vm and start using "k" alias to use kubectl

kubectl --kubeconfig rke2.yaml get po -A

OR

export KUBECONFIG=$PWD/rke2.yaml

to directly set your KUBECONFIG on your local computer.

See the template's source for exactly what it runs.