#!/bin/sh # Sources: # https://www.rancher.cn/an-introduction-to-rke # https://devopsheaven.com/kubernetes/k8s/rke/devops/deploy/2019/10/21/install-kubernetes-locally-rke.html if [ "$(id -u)" -ne 0 ]; then echo "This script should be run as root. Aborting..." > /dev/stderr exit 1 fi echo "Downloading and installing 'rke' executable..." wget -O rke https://github.com/rancher/rke/releases/download/v1.2.3/rke_linux-amd64 && \ chmod +x rke && \ mv rke /usr/local/bin && \ rke --version echo "Giving access to the docker socket at the SSH user..." usermod -aG docker "$(id -un)"