🛠 Cluster Kubernetes : quatre CM3+ sur une Turing Pi

Raspberry Pi Compute Module 3+ (CM3+ / CM3+ Lite) · avance · Schéma : une carte Turing Pi v1 avec quatre modules CM3+ insérés dans leurs connecteurs SODIMM, un câble Ethernet par nœud et un module d'alimentation, le tout piloté en Kubernetes (K3s).

Objectives

The SODIMM format of the CM3+ enabled a family of cluster boards: the Turing Pi v1 hosts four Compute Module units (including the CM3+) with Ethernet, redundant power supply, and per-node power control. The reference build is Jeff Geerling's (repository geerlingguy/turing-pi-cluster, which explicitly lists "Raspberry Pi Compute Module 3+ and HypriotOS"): a four-node K3s cluster. This tutorial follows that approach: flashing HypriotOS, booting the four nodes, installing K3s, and deploying across multiple nodes.

Hardware

Complete Code

# 1. Flasher HypriotOS (images Pi 3 compatibles CM3+) sur les 4 eMMC via usbboot
#    (un module à la fois en device-boot, comme pour tout CM à eMMC)
export HIPRIVE=192.168.1.0/24
flash --hostname node1 --addr 192.168.1.11 hypriotos-rpi-v1.8.0.img.zip

# 2. Installer K3s sur le serveur (node1), les agents rejoignent via token
#    Sur node1 :
curl -sfL https://get.k3s.io | sh -s - server --write-kubeconfig-mode 644
cat /var/lib/rancher/k3s/server/node-token

# 3. Sur node2-4 : rejoindre le cluster
curl -sfL https://get.k3s.io | K3S_URL=https://192.168.1.11:6443 \
  K3S_TOKEN=<token> sh -

# 4. Vérifier et déployer
kubectl get nodes -o wide
kubectl create deployment nginx --image=nginx --replicas=4
kubectl get pods -o wide    # les 4 pods doivent se répartir sur les 4 nœuds

Expected Verification

kubectl get nodes lists 4 Ready nodes (1 server + 3 agents), each with its static HypriotOS IP address. The nginx deployment with 4 replicas is distributed across the four modules — proof that the cluster is working. The Turing Pi allows shutting down a node via its power control: the pod restarts elsewhere within seconds.

Common Errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials