Skip to content

Instantly share code, notes, and snippets.

@Sensei-CHO
Sensei-CHO / README.md
Created January 24, 2024 20:58
Setting up Cilium LoadBalancer and Nginx ingress on a k3s cluster

Setting up Cilium LoadBalancer and Nginx ingress on a k3s cluster

In a recent post I talked about setting up a k3s cluster with IPv6 enabled and High Availability. The next upgrade is making the applications we are going to deploy in our cluster accessible from the outside world !

In this write-up we'll see how to setup 2 important things in Kubernetes clusters:

  • LoadBalancer: Uses an IP external to the cluster to redirect traffic to an application internally.
  • Ingress-Controller: Serves as a reverse-proxy to redirect traffic to application based on rules like DNS entries.

Combining a LoadBalancer and a Ingress-Controller allows us to redirect traffic coming from outside of our cluster to internal applications using specific rules.

@Sensei-CHO
Sensei-CHO / README.md
Created January 23, 2024 15:03
Mise en place d'un système de documentation assisté par IA

Mise en place d'un système de documentation assisté par IA

Toutes les commandes sont à exécuter en root

Installation de docker

Docker permet de lancer des applications de façon simplifié, multi-plateforme et multi-version.

apt install curl
@Sensei-CHO
Sensei-CHO / README.md
Last active September 5, 2025 17:26
Setting up a K3S Highly Available cluster with IPv6

Setting up a K3S Highly Available cluster with IPv6 in 3 minutes !

In this write-up we'll see how to deploy a k3s cluster with high availability and dual-stack IPv4/IPv6 networking.

Most use cases of Kubernetes requires HA in their environment. In my case (which is learning networking and Kubernetes with low-cost hardware) I'll need low consumption and IPv6 too !

In this write-up we will deploy a 6 nodes k3s cluster with 3 master nodes and 3 workers.

So how are we going to get around this ?

# Définir le nombre de messages à récupérer
$nombreDeMessages = 10
# Récupérer les 10 derniers messages de journal pour le niveau critique
$messagesCritiques = Get-WinEvent -LogName "System" -FilterXPath "*[System[(Level=1)]]" -MaxEvents $nombreDeMessages
# Récupérer les 10 derniers messages de journal pour le niveau avertissement
$messagesAvertissement = Get-WinEvent -LogName "System" -FilterXPath "*[System[(Level=2)]]" -MaxEvents $nombreDeMessages
# Récupérer les 10 derniers messages de journal pour le niveau erreur
@Sensei-CHO
Sensei-CHO / README.md
Last active April 18, 2025 15:46
Single disk proxmox glusterfs cluster

Proxmox cluster with dstributed storage for HA with single disk nodes

Preparing nodes

Every steps listed here have to be done on each proxmoxnode

Verify installation

  • verify networking interfaces and addresses
  • add no-subscription repos
@Sensei-CHO
Sensei-CHO / bootstrap.sh
Created November 17, 2023 09:08
Try canonical MicroCloud
# This script is a proof of concept to try MicroCloud, it is not production ready or even working properly...
echo "[+]Refreshing LXD"
echo
snap refresh lxd --channel=5.19/stable
echo "Initialising LXD"
echo
lxd init --auto
echo "[+]Creating SDN Network"
@Sensei-CHO
Sensei-CHO / haproxy.cfg
Created July 29, 2023 14:17
Haproxy proxmox load-balancer
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy_admin.sock mode 660 level admin expose-fd listeners
stats timeout 30s
user haproxy
group haproxy
daemon
ca-base /etc/ssl/certs
@Sensei-CHO
Sensei-CHO / pve-expose.yaml
Created July 29, 2023 14:16
Expose proxmox with kubernetes nginx ingress
apiVersion: v1
kind: Namespace
metadata:
name: proxmox-expose
---
kind: Service
metadata:
name: pve-svc
namespace: proxmox-expose
spec: