Installation
K3s
curl -sfL https://get.k3s.io | sh -
After running this installation:
- The K3s service will be configured to automatically restart after node reboots or if the process crashes or is killed
- Additional utilities will be installed, including kubectl, crictl, ctr, k3s-killall.sh, and k3s-uninstall.sh
- A kubeconfig file will be written to /etc/rancher/k3s/k3s.yaml and the kubectl installed by K3s will automatically use it
sudo cp /etc/rancher/k3s/k3s.yaml ~
sudo chown <your-id> k3s.yaml
export KUBECONFIG=~/k3s.yaml
kubectl config view
Install additional agent node
/var/lib/rancher/k3s/server/node-token on your server node.
curl -sfL https://get.k3s.io | K3S_URL=https://myserver:6443 K3S_TOKEN=mynodetoken sh -