Skip to content

Lab Cilium cannot recover after a site's API server restarts #1080

Closed

Description

@privateip

Summary

The containerlab lab installs Cilium with kube-proxy replacement but without k8sServiceHost or k8sServicePort. Cilium's agents then reach the API server only through the kubernetes Service address, which Cilium itself load-balances. When a site's API server restarts, Cilium can drop that Service's backend and then never reconnect to learn it again, so the whole site stops working until someone repairs Cilium by hand.

Steps to reproduce

  1. Deploy the lab from main with task deploy on a host whose disk is slow enough that a control plane's API server restarts during bring-up, or restart one site's API server after deploy.
  2. Watch that site's cilium and cilium-operator pods.

What happens

Every pod on the site that talks to the API server through the Service address fails with connect: operation not permitted. The Cilium agents report Kubernetes service is not ready and stay unready, cilium-operator crash-loops, and so do galactic-controller and cert-manager's cainjector. task deploy then fails at the next step that needs the traffic-policy webhook.

Expected

A site recovers by itself once its API server is back, as it does when Cilium reaches the API server directly.

Cause

deploy/containerlab/scripts/deploy-cni.sh passes --set kubeProxyReplacement=true with no k8sServiceHost/k8sServicePort. Cilium's kube-proxy replacement documentation requires both, so the agent can reach the API server without depending on the Service it programs.

Fix

Add --set k8sServiceHost=<site control-plane> --set k8sServicePort=6443 to the install in deploy-cni.sh. Upgrading Cilium with those values and restarting its DaemonSet and operator recovers a lab that is already stuck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions