Skip to content

Installing Kubernetes

Cluster Init

Download the script to init the cluster on first node

wget https://raw.githubusercontent.com/rogerrum/homelab-infrastructure/main/k3s/ha/setupMainNode.sh \
 -O setupMainNode.sh  && chmod +x setupMainNode.sh

Create cluster and get token to setup the remaining nodes

./setupMainNode.sh

Additional master nodes for HA

Download the script on HA nodes

wget https://raw.githubusercontent.com/rogerrum/homelab-infrastructure/main/k3s/ha/setupHANode.sh \
 -O setupHANode.sh  && chmod +x setupHANode.sh

Use the token from the First master node to join the cluster

./setupHANode.sh <Token>

Add worker nodes

Download the script

wget https://raw.githubusercontent.com/rogerrum/homelab-infrastructure/main/k3s/ha/setupWorkerNode.sh \
 -O setupWorkerNode.sh  && chmod +x setupWorkerNode.sh

Use the token from the First master node to join the cluster

./setupWorkerNode.sh <Token>

Add worker nodes (arm)

Download the script

wget https://raw.githubusercontent.com/rogerrum/homelab-infrastructure/main/k3s/ha/setupWorkerNodeArm.sh \
 -O setupWorkerNodeArm.sh  && chmod +x setupWorkerNodeArm.sh

Use the token from the First master node to join the cluster

./setupWorkerNodeArm.sh <Token>

Add worker nodes (arm64)

Download the script

wget https://raw.githubusercontent.com/rogerrum/homelab-infrastructure/main/k3s/ha/setupWorkerNodeArm64.sh \
 -O setupWorkerNodeArm64.sh  && chmod +x setupWorkerNodeArm64.sh

Use the token from the First master node to join the cluster

./setupWorkerNodeArm64.sh <Token>