Use bundled kubectl and ctr

rke2 ships its own kubectl/crictl/ctr under /var/lib/rancher/rke2/bin, not in $PATH by default

export PATH=$PATH:/var/lib/rancher/rke2/bin KUBECONFIG=/etc/rancher/rke2/rke2.yaml && rke2 ctr images ls

tool
rke22 commands
tags
rke2debugk8s

More rke2 commands

  • printf 'token: <id>\ntls-san:\n - <host>\n' > /etc/rancher/rke2/config.yaml && systemctl enable --now rke2-server

    Declarative server config + enable unit; add tls-san so the LB hostname is in the API cert

all 2 rke2 commands