From a14ad90979559805d1963f76876997a97f3cf7a6 Mon Sep 17 00:00:00 2001 From: Gitea Actions Date: Fri, 18 Jul 2025 15:11:36 +0000 Subject: [PATCH] Auto-update blog content from Obsidian: 2025-07-18 15:11:36 --- ...ate-manual-kubernetes-cluster-kubeadm.fr.md | 18 +++++++++--------- ...create-manual-kubernetes-cluster-kubeadm.md | 14 +++++++------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/content/post/8-create-manual-kubernetes-cluster-kubeadm.fr.md b/content/post/8-create-manual-kubernetes-cluster-kubeadm.fr.md index da2f762..7dd0b27 100644 --- a/content/post/8-create-manual-kubernetes-cluster-kubeadm.fr.md +++ b/content/post/8-create-manual-kubernetes-cluster-kubeadm.fr.md @@ -3,7 +3,7 @@ slug: create-manual-kubernetes-cluster-kubeadm title: Créer un Cluster Kubernetes Hautement Disponible avec kubeadm sur des VMs description: Guide étape par étape pour créer manuellement un cluster Kubernetes hautement disponible sur des machines virtuelles avec kubeadm. date: 2025-07-18 -draft: true +draft: false tags: - kubernetes - highly-available @@ -14,13 +14,11 @@ categories: ## Intro -Dans cet [article précédent]({{< ref "post/7-terraform-create-proxmox-module" >}}), j'expliquais comment déployer 6 VMs avec **Terraform** sur **Proxmox**, 3 nœuds masters et 3 nœuds workers, en m'appuyant sur un [template cloud-init]({{< ref "post/1-proxmox-cloud-init-vm-template" >}}). +Dans cet [article précédent]({{< ref "post/7-terraform-create-proxmox-module" >}}), j'expliquais comment déployer des VMs avec un module **Terraform** sur **Proxmox** et j'avais terminé avec 6 VMs, 3 nœuds masters et 3 nœuds workers, en m'appuyant sur un [template cloud-init]({{< ref "post/1-proxmox-cloud-init-vm-template" >}}). Maintenant que l'infrastructure est prête, passons à l'étape suivante : **créer manuellement un cluster Kubernetes** avec `kubeadm`. -Dans cet article, je vais détailler chaque étape de l'installation d’un cluster Kubernetes simple, depuis la préparation des nœuds jusqu'au déploiement d'une application basique. - -Je n'utiliserai pas d'outil d'automatisation pour configurer les nœuds pour le moment, afin de mieux comprendre les étapes impliquées dans le bootstrap d’un cluster Kubernetes. L'automatisation sera couverte dans de futurs articles. +Dans cet article, je vais détailler chaque étape de l'installation d’un cluster Kubernetes simple. Je n'utiliserai pas d'outil d'automatisation pour configurer les nœuds pour le moment, afin de mieux comprendre les étapes impliquées dans le bootstrap d’un cluster Kubernetes. L'automatisation sera couverte dans de futurs articles. --- ## Qu'est ce que Kubernetes @@ -99,7 +97,7 @@ En production, vous devez autoriser la communication entre les nœuds sur les po | TCP | Entrant | 10250 | API Kubelet | Control plane | | TCP | Entrant | 10256 | kube-proxy | Load balancers | | TCP | Entrant | 30000-32767 | Services NodePort | Tous | -### Modules noyau et paramètres sysctl +### Modules Noyau et Paramètres sysctl Kubernetes requiert l’activation de deux modules noyau : - **overlay** : pour permettre l’empilement de systèmes de fichiers. @@ -204,13 +202,13 @@ sudo kubeadm init \ - `--upload-certs` : Télécharge les certificats qui doivent être partagés entre toutes les masters du cluster. - `--pod-network-cidr` : Sous-réseau à utiliser pour le CNI. -ℹ️ Le nom DNS `k8s-lab.lab.vezpi.me` est géré dans mon homelab par **Unbound DNS**, cela résout sur mon interface d'**OPNsense** où un service **HAProxy** écoute sur le port 6443 et équilibre la charge entre les 3 nœuds du plan de contrôle. - Cette étape va : - Initialiser la base `etcd` et les composants du plan de contrôle. - Configurer RBAC et les tokens d’amorçage. - Afficher deux commandes `kubeadm join` importantes : une pour les **workers**, l’autre pour les **masters supplémentaires**. +ℹ️ Le nom DNS `k8s-lab.lab.vezpi.me` est géré dans mon homelab par **Unbound DNS**, cela résout sur mon interface d'**OPNsense** où un service **HAProxy** écoute sur le port 6443 et équilibre la charge entre les 3 nœuds du plan de contrôle. + Vous verrez aussi un message indiquant comment configurer l’accès `kubectl`. ```plaintext @@ -493,7 +491,7 @@ I0718 09:26:12.448472 18624 version.go:261] remote version is much newer: v1.3 7531149107ebc3caf4990f94d19824aecf39d93b84ee1b9c86aee84c04e76656 ``` -#### Générer un token +#### Générer un Token Associé au certificat, vous aurez besoin d’un **nouveau token**, cette commande affichera directement la commande complète `join` pour un master : ```bash @@ -622,6 +620,8 @@ __ [cilium-test-1] All 73 tests (739 actions) successful, 50 tests skipped, 1 sc --- ## Conclusion +🚀 Notre cluster Kubernetes hautement disponible est prêt ! + Dans cet article, nous avons vu comment **créer manuellement un cluster Kubernetes** à l’aide de `kubeadm`, sur un ensemble de 6 machines Ubuntu (3 masters et 3 workers) préalablement déployées avec Terraform sur Proxmox. Nous avons suivi les étapes suivantes : diff --git a/content/post/8-create-manual-kubernetes-cluster-kubeadm.md b/content/post/8-create-manual-kubernetes-cluster-kubeadm.md index 2ffc29f..b6d6e3c 100644 --- a/content/post/8-create-manual-kubernetes-cluster-kubeadm.md +++ b/content/post/8-create-manual-kubernetes-cluster-kubeadm.md @@ -3,7 +3,7 @@ slug: create-manual-kubernetes-cluster-kubeadm title: Create a Highly Available Kubernetes Cluster with kubeadm on VMs description: Step-by-step guide to manually build a highly available Kubernetes cluster on virtual machines using kubeadm date: 2025-07-18 -draft: true +draft: false tags: - kubernetes - highly-available @@ -14,13 +14,11 @@ categories: ## Intro -In this [previous article]({{< ref "post/7-terraform-create-proxmox-module" >}}), I explained how to deploy 6 VMs using **Terraform** on **Proxmox**, 3 masters and 3 workers nodes, based on [cloud-init template]({{< ref "post/1-proxmox-cloud-init-vm-template" >}}). +In this [previous article]({{< ref "post/7-terraform-create-proxmox-module" >}}), I explained how to deploy VMs using a **Terraform** module with **Proxmox** and ended up with 6 VMs, 3 masters and 3 workers nodes, based on [cloud-init template]({{< ref "post/1-proxmox-cloud-init-vm-template" >}}). Now that the infrastructure is ready, let’s move on to the next step: **manually building a Kubernetes cluster** using `kubeadm`. -In this post, I’ll walk through each step of the installation process of a simple Kubernetes cluster, from preparing the nodes to deploying a basic application. - -I will not rely on automation tools to configure the nodes for now, to better understand what are the steps involved in a Kubernetes cluster bootstrapping. Automation will be covered in future posts. +In this post, I’ll walk through each step of the installation process of a simple Kubernetes cluster. I will not rely on automation tools to configure the nodes for now, to better understand what are the steps involved in a Kubernetes cluster bootstrapping. Automation will be covered in future posts. --- ## What is Kubernetes @@ -204,13 +202,13 @@ sudo kubeadm init \ - `--upload-certs`: Upload the certificates that should be shared across all masters of the cluster. - `--pod-network-cidr`: Subnet for the CNI. -ℹ️ The DNS name `k8s-lab.lab.vezpi.me` is handled in my homelab by **Unbound DNS**, this resolves on my **OPNsense** interface where a **HAProxy** service listen on the port 6443 and load balance between the 3 control plane nodes. - This step will: - Initialize the `etcd` database and control plane components. - Set up RBAC and bootstrap tokens. - Output two important `kubeadm join` commands: one for **workers**, and one for **additional control-plane nodes**. +ℹ️ The DNS name `k8s-lab.lab.vezpi.me` is handled in my homelab by **Unbound DNS**, this resolves on my **OPNsense** interface where a **HAProxy** service listen on the port 6443 and load balance between the 3 control plane nodes. + You’ll also see a message instructing you to set up your `kubectl` access. ```plaintext @@ -619,6 +617,8 @@ __ [cilium-test-1] All 73 tests (739 actions) successful, 50 tests skipped, 1 sc --- ## Conclusion +🚀 Our highly available Kubernetes cluster is ready! + In this post, we walked through the **manual creation of a Kubernetes cluster** using `kubeadm`, on top of 6 Ubuntu VMs (3 masters and 3 workers) previously provisioned with Terraform on Proxmox. We went step by step: