Skip to content

Instantly share code, notes, and snippets.

@dkeightley
Created September 16, 2021 03:41
Show Gist options
  • Save dkeightley/b48588f6641201484f9f65059b1335f7 to your computer and use it in GitHub Desktop.
Save dkeightley/b48588f6641201484f9f65059b1335f7 to your computer and use it in GitHub Desktop.
rke2-single-install

Install

curl -sfL https://get.rke2.io | sh -
systemctl enable rke2-server.service
systemctl start rke2-server.service

Env setup

cat >> /etc/profile <<EOF
export KUBECONFIG=/etc/rancher/rke2/rke2.yaml
export CRI_CONFIG_FILE=/var/lib/rancher/rke2/agent/etc/crictl.yaml
PATH="$PATH:/var/lib/rancher/rke2/bin"
alias k=kubectl
EOF
source /etc/profile

Test

After some time.. while the static pods start

kubectl get pods -A
NAMESPACE     NAME                                                    READY   STATUS              RESTARTS   AGE
kube-system   cloud-controller-manager-ip-10-99-11-236                1/1     Running             0          41s
kube-system   etcd-ip-10-99-11-236                                    1/1     Running             0          42s
kube-system   helm-install-rke2-canal-wxdn6                           0/1     Completed           0          59s
[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment