All checks were successful
Reese's Arch Toolbox / build-and-push-arch-toolbox (push) Successful in 14s
1.4 KiB
1.4 KiB
K3S Cluster
Cluster Setup
-
Install wireguard
pacman -S wireguard-tools linux-headers -
Assign static IPs to each node
/etc/dhcpcd.conf
... interface enp1s0 static ip_address=192.168.122.51/24 # 52, 53 static routers=192.168.122.1 static domain_name_servers=192.168.122.1
K3S Installation
-
Generate a secure token
umask 077 k3s token generate > token.txt export SECRET=$(cat token.txt) -
Create the cluster
curl -sfL https://get.k3s.io | K3S_TOKEN=$SECRET sh -s - server \ --cluster-init \ --flannel-backend=wireguard-native \ --disable=traefik \ --secrets-encryption \ --tls-san=192.168.122.51 -
Join each server node
curl -sfL https://get.k3s.io | K3S_TOKEN=$SECRET sh -s - server \ --server https://192.168.122.51:6443 \ --flannel-backend=wireguard-native \ --disable=traefik \ --secrets-encryption \ --tls-san=192.168.122.52 -
Copy the kube config at /etc/rancher/k3s/k3s.yaml to YOUR computer at ~/.kube/dev-config
export KUBECONFIG=~/.kube/dev-config -
Modify the dev-config file's
serverattribute, replace with your IP/hostname