- 📘Table of Contents
- 🖖Introduction
- ✨Steps
- 👉Step 1: Initialize the Kubernetes cluster on the master node
- 👉Step 2: Copy the credentials to the user's home directory
- 👉Step 3: Join the master nodes to the cluster
- 👉Step 4: Join the worker nodes to the cluster
- 👉Step 5: Install helm
- 👉Step 6: Install the Cilium CNI plugin
- 👉Step 7: Now wait for all the pots to be running
- 👉Step 8: Check the status of the nodes
- 🔗Links
This document provides a step-by-step guide to setting up the Kubernetes
clusters in the supercluster. The steps outlined in this document are essential for ensuring the proper functioning of the clusters and the supercluster.
# Cluster01
sudo kubeadm init --config https://raw.githubusercontent.com/EliasDH-com/K8s-Infrastructure/refs/heads/main/Supercluster/Cluster01/ClusterConfiguration.yaml --upload-certs --v "5" # For cluster01 on node01, node02, node03
# Cluster02
sudo kubeadm init --config https://raw.githubusercontent.com/EliasDH-com/K8s-Infrastructure/refs/heads/main/Supercluster/Cluster02/ClusterConfiguration.yaml --upload-certs --v "5" # For cluster02 on node11, node12, node13
# Cluster03
sudo kubeadm init --config https://raw.githubusercontent.com/EliasDH-com/K8s-Infrastructure/refs/heads/main/Supercluster/Cluster03/ClusterConfiguration.yaml --upload-certs --v "5" # For cluster03 on node21, node22, node23
Note: Copy the kubeadm join commands for the worker nodes and the master node
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/
Note: This most be done on all the master nodes
# Cluster01
sudo kubeadm join 10.1.0.10:6443 --token <token> \
--discovery-token-ca-cert-hash sha256:<hash> \
--control-plane --certificate-key <key>
# Cluster02
sudo kubeadm join 10.2.0.10:6443 --token <token> \
--discovery-token-ca-cert-hash sha256:<hash> \
--control-plane --certificate-key <key>
# Cluster03
sudo kubeadm join 10.3.0.10:6443 --token <token> \
--discovery-token-ca-cert-hash sha256:<hash> \
--control-plane --certificate-key <key>
# Cluster01
sudo kubeadm join 10.1.0.10:6443 --token <token> \
--discovery-token-ca-cert-hash sha256:<hash>
# Cluster02
sudo kubeadm join 10.2.0.10:6443 --token <token> \
--discovery-token-ca-cert-hash sha256:<hash>
# Cluster03
sudo kubeadm join 10.3.0.10:6443 --token <token> \
--discovery-token-ca-cert-hash sha256:<hash>
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
sudo ./get_helm.sh
# Install the Cilium CLI
helm repo add cilium https://helm.cilium.io/
# Set the Cilium CLI version
CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/main/stable.txt)
# Set the Cilium CLI architecture
CLI_ARCH=amd64
# Check the architecture
if [ "$(uname -m)" = "aarch64" ]; then CLI_ARCH=arm64; fi
# Download the Cilium CLI
curl -L --fail --remote-name-all https://github.com/cilium/cilium-cli/releases/download/${CILIUM_CLI_VERSION}/cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum}
# Verify the Cilium CLI
sha256sum --check cilium-linux-${CLI_ARCH}.tar.gz.sha256sum
# Extract the Cilium CLI
sudo tar xzvfC cilium-linux-${CLI_ARCH}.tar.gz /usr/local/bin
# Remove the Cilium CLI
rm cilium-linux-${CLI_ARCH}.tar.gz{,.sha256sum}
# Install the Cilium Helm chart
helm install cilium cilium/cilium --version 1.16.1 \
--namespace kube-system \
--set prometheus.enabled=true \
--set operator.prometheus.enabled=true
Note: CNI is a plugin that allows Kubernetes to communicate with the network. Cilium is a CNI plugin that provides networking, security, and observability features.
CNI = Container Network Interface
watch kubectl get pods -n kube-system # Press Ctrl+C to exit
watch kubectl get nodes -o wide # Press Ctrl+C to exit
- 👯 Web hosting company EliasDH.com.
- 📫 How to reach us elias.dehondt@outlook.com