From 9613589dead872d851ce290623ef6aeac20abc8c Mon Sep 17 00:00:00 2001 From: Ludovic Piot Date: Thu, 12 Jun 2025 20:23:59 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Add=20small=20section=20about=20?= =?UTF-8?q?SSH=20keypairs=20rotation=20for=20Flux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- slides/k8s/M6-monitoring-stack-install.md | 46 +++++++++++++++++++++-- slides/m6.yml | 3 +- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/slides/k8s/M6-monitoring-stack-install.md b/slides/k8s/M6-monitoring-stack-install.md index 3cee823e..c3a63023 100644 --- a/slides/k8s/M6-monitoring-stack-install.md +++ b/slides/k8s/M6-monitoring-stack-install.md @@ -7,7 +7,7 @@ Note: --- -## Install Monitoring components +## Creating `Github` source in Flux for monitoring components install repository .lab[ @@ -24,7 +24,7 @@ k8s@shpod:~/fleet-config-using-flux-XXXXX$ flux create source git monitoring \ --- -## Creating `kustomization` in Flux for monitoring stack +### Creating `kustomization` in Flux for monitoring stack .lab[ @@ -40,7 +40,7 @@ k8s@shpod:~/fleet-config-using-flux-XXXXX$ flux create kustomization monitoring --- -## Install Flux Grafana dashboards +### Install Flux Grafana dashboards .lab[ @@ -68,6 +68,46 @@ class: pic --- +## Flux repository synchro is broken😅 + +It seems that `Flux` on **_☁️CLOUDY_** cluster is not able to authenticate with `ssh` on its `Github` config repository! + +What happened? +When we install `Flux` on **_🤘METAL_** cluster, it generates a new `ssh` keypair and override the one used by **_☁️CLOUDY_** among the "deployment keys" of the `Github` repository. + +⚠️ Beware of flux bootstrap command! + +We have to +- generate a new keypair (or reuse an already existing one) +- add the private key to the Flux-dedicated secrets in **_☁️CLOUDY_** cluster +- add it to the "deployment keys" of the `Github` repository + +--- + +### the command + +.lab[ + +- `Flux` _CLI_ helps to recreate the secret holding the `ssh` **private** key. + +```bash +flux create secret git flux-system \ + --url=ssh://git@github.com/container-training-fleet/fleet-config-using-flux-XXXXX \ + --private-key-file=/home/k8s/.ssh/id_ed25519 +``` + +- copy the **public** key into the deployment keys of the `Github` repository + +] + +--- + +class: pic + +![Running Mario](images/M6-running-Mario.gif) + +--- + ## Access the Grafana dashboard .lab[ diff --git a/slides/m6.yml b/slides/m6.yml index c4705d01..4ea40651 100644 --- a/slides/m6.yml +++ b/slides/m6.yml @@ -17,10 +17,11 @@ exclude: content: - k8s/M6-START-a-company-scenario.md - - k8S/M6-T02-flux-install.md + - k8s/M6-T02-flux-install.md - k8s/M6-T03-installing-tenants.md - k8s/M6-R01-flux_configure-ROCKY-deployment.md - k8s/M6-T05-ingress-config.md - k8s/M6-M01-adding-MOVY-tenant.md - k8s/M6-K01-METAL-install.md - k8s/M6-K03-openebs-install.md + - k8s/M6-monitoring-stack-install.md \ No newline at end of file