Skip to content

Debian compatibility - #17

Open
RWejlgaard wants to merge 9 commits into
7wingfly:mainfrom
RWejlgaard:debian-compat
Open

Debian compatibility#17
RWejlgaard wants to merge 9 commits into
7wingfly:mainfrom
RWejlgaard:debian-compat

Conversation

@RWejlgaard

@RWejlgaard RWejlgaard commented May 6, 2026

Copy link
Copy Markdown

Debian 13 compatibility + quality-of-life fixes

Extends support to Debian 13 (Trixie) while keeping Ubuntu fully working. Also improves script reliability
and adds uninstall scripts.

These changes has been tested against 2 VMs running Debian 13, one master and one slave. I also verified that the master setup script still works on a separate VM running Ubuntu Server 26.04 LTS.

Debian 13 compatibility

  • Network configuration - replaces the Ubuntu-only netplan with runtime detection: uses netplan on Ubuntu,
    falls back to nmcli (NetworkManager) on Debian. Fails with a clear error if neither is found
  • CNI binary path - explicitly sets bin_dir = "/opt/cni/bin" in the containerd config, overriding Debian's
    default of /usr/lib/cni so Flannel and Cilium plugins are found correctly
  • /usr/sbin in PATH - Debian doesn't include /sbin//usr/sbin in non-login shell PATH, causing modprobe,
    sysctl, and swapoff to fail. Added at the top of both scripts
  • software-properties-common removed - Ubuntu-centric package that isn't used anywhere in the scripts and
    doesn't exist in Debian's repos
  • sysctl -p → sysctl --system - sysctl -p reads /etc/sysctl.conf which doesn't exist on minimal Debian
    installs; --system reads all drop-in config dirs correctly on both distros

Bug fixes

  • mkdir -p /etc/containerd - apt install containerd creates the directory, so the subsequent mkdir without
    -p would fail on any re-run
  • MetalLB --wait removed - the speaker pods depend on the metallb-memberlist secret, which the controller
    creates on first run. Using --wait caused a deadlock; now waits explicitly for only the controller
    deployment before applying the IP pool config

Script repeatability

Re-running a partially failed script no longer errors out:

  • kubeadm init / kubeadm join - automatically runs kubeadm reset -f first if a previous run got that far
  • helm install for NFS and SMB CSI drivers - changed to helm upgrade --install
  • helm repo add - added --force-update to all four calls
  • kubectl create secret for SMB credentials - uses --dry-run=client -o yaml | kubectl apply -f -

Uninstall scripts

New uninstall/ directory with:

  • cleanup_master_node.sh - tears down everything the master script installs: kubeadm reset, Kubernetes
    packages and apt repo, containerd, Helm, NFS/Samba servers (share directories preserved), Cilium/Hubble/Flux
    CLIs, CNI interfaces and configs, kernel module/sysctl configs, and restores swap from fstab backup
  • cleanup_worker_node.sh - same but scoped to what the worker script installs (no Helm, NFS, Samba, etcd, or
    CLIs)

@RWejlgaard
RWejlgaard marked this pull request as ready for review May 9, 2026 10:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant