Skip to main content

Cluster HA - Loghorn - Cilium - KubeVip

Architecture

Hostname
RAM
CPU
DISQUE
IP
FONCTION
k8s-master-1
4 go 2 60 SSD 192.168.1.101 etcd + control-plane
k8s-master-2 4 go 2 60 SSD 192.168.1.102 etcd + control-plane
k8s-master-3 4 go 2 60 SSD 192.168.1.103 etcd + control-plane
k8s-worker-1 16 go 4 60 SSD + 100 Go HDD (/opt) 192.168.1.104
k8s-worker-2 16 go 4 60 SSD + 100 Go HDD (/opt) 192.168.1.105
k8s-worker-3 16 go 4 60 SSD + 100 Go HDD (/opt) 192.168.1.106


 

VIP CLUSTER 192.168.1.100



VIP WORKERS 192.168.1.99



Tous les noeuds sont sur debian 13.

Résumé :

Type de cluster : Haute Disponibilité

Stockage : Loghorn

Réseau : Cilium

Exposition des workers : KubeVip

Préparation du systèm

CF : https://docs.nehemiebarkia.fr/books/kubernetes/page/initialisation-de-mon-tout-premier-cluster-ha

Installation des prérequits

CF : https://docs.nehemiebarkia.fr/books/kubernetes/page/initialisation-de-mon-tout-premier-cluster-ha

Préparation du cluster HA (KubeVip)

CF : https://docs.nehemiebarkia.fr/books/kubernetes/page/initialisation-de-mon-tout-premier-cluster-ha

Initialisation du cluster

CF : https://docs.nehemiebarkia.fr/books/kubernetes/page/initialisation-de-mon-tout-premier-cluster-ha

Installation du réseau Cilium 

Installation de cilium-cli : 

CILIUM_CLI_VERSION=$(curl -s https://raw.githubusercontent.com/cilium/cilium-cli/main/stable.txt)
curl -L --fail --remote-name-all https://github.com/cilium/cilium-cli/releases/download/${CILIUM_CLI_VERSION}/cilium-linux-amd64.tar.gz
sudo tar xzvf cilium-linux-amd64.tar.gz -C /usr/local/bin
rm cilium-linux-amd64.tar.gz

Déploiement :

cilium install --set ipam.operator.clusterPoolIPv4PodCIDRList="10.10.0.0/16"

Attendre que le statut soit opérationnel :

cilium status --wait

Vérification de la conectivité : 

cilium connectivity check

Suivi des pods :

watch kubectl get pods -n kube-system -l k8s-app=cilium

Configuration du cluster

CF : https://docs.nehemiebarkia.fr/books/kubernetes/page/initialisation-de-mon-tout-premier-cluster-ha

Ajout des différents noeuds master au cluster

CF : https://docs.nehemiebarkia.fr/books/kubernetes/page/initialisation-de-mon-tout-premier-cluster-ha

Déployer Loghorn

CF : https://docs.nehemiebarkia.fr/books/kubernetes/page/initialisation-de-mon-tout-premier-cluster-ha

Ajout des lablels "workers" aux noeuds workers :

kubectl label node k8s-worker-1 node-role.kubernetes.io/worker="true"
kubectl label node k8s-worker-2 node-role.kubernetes.io/worker="true"
kubectl label node k8s-worker-3 node-role.kubernetes.io/worker="true"

Déployer une VIP pour les noeuds Workers