Post

Qualifying Flannel and Cilium Coexistence in Kind

Qualifying Flannel and Cilium Coexistence in Kind

This push adds a continuous‑integration workflow and a companion Python helper that automatically spin up a disposable Kind cluster with both Flannel and Cilium installed, then verify that pods can communicate across the two networking layers. The change gives the homelab a reproducible gate for any future Cilium migration and surface‑level confidence that overlay coexistence does not break existing workloads.

Coexistence workflow design

The workflow also limits its scope to the paths that matter – the Cilium manifests under clusters/homelab/platform/cilium/, the Multus config under clusters/homelab/platform/multus/, and the script itself – so unrelated changes do not trigger a full run.

Script functionality and checks

The helper script scripts/ci/cilium-migration-check.py is a self‑contained Python program that provisions a Kind cluster named cilium-migration-check, adds a control‑plane and a worker node, then launches a fixture pod labeled with io.cilium.migration/cilium-default. Depending on the trial it either verifies mixed‑overlay pod and Service connectivity (the coexistence path) or validates that Cilium’s default‑deny posture blocks unexpected traffic and that only explicitly allowed egress rules succeed (the egress path). The script downloads required container images with hash verification, applies them via kubectl apply, and raises a non‑zero exit status if any step times out or produces errors, causing the GitHub Action to mark the job as failed.

Platform engineering considerations

Because the workflow and script are stored under the homelab GitOps repository, they become part of the declarative infrastructure that the platform team already tracks. Adding this CI gate means any future change to the Cilium configuration, Flannel version, or Kind base image will be automatically tested before merging, reducing the risk of a broken networking stack in production‑like environments. The design is deliberately portable: the same matrix pattern could be reused for other CNI migrations, and the python helper’s arguments (e.g., --egre) are explicit enough to be documented in the team’s run‑book without exposing secrets or raw cluster credentials.

This post is licensed under CC BY 4.0 by the author.