Day 8: Add-ons in the right order
Goal: Upgrade Cilium from 1.19 to 1.20 and metrics-server from 0.8 to 0.9, check compatibility beforehand, and not lose local customizations · Duration: approx. 60 min · Prerequisite: Day 7
Briefing
- kubeadm only upgrades its own add-ons (CoreDNS, kube-proxy). The network plugin, metrics-server and everything from Helm are your job (Day 1).
- Every add-on has its own compatibility list of Kubernetes versions. It limits how far you may upgrade Kubernetes and determines the order.
- The second trap: customizations you made to an add-on after the fact get lost when you apply the new version, unless they are written down in a file.
| Add-on | Tested with Kubernetes | Source |
|---|---|---|
| Cilium 1.19 | 1.32 to 1.35 | docs.cilium.io, “Kubernetes Compatibility” |
| Cilium 1.20 | 1.33 to 1.36 | same |
Drill 1: Check compatibility – too late
mkdir -p ~/day2/tag08 && cd ~/day2/tag08
for b in v1.19 v1.20; do echo "== $b"; curl -s https://raw.githubusercontent.com/cilium/\
cilium/$b/Documentation/network/kubernetes/compatibility.rst | grep -o '^| 1\.[0-9, .]*'; doneExpected:
== v1.19
| 1.32, 1.33, 1.34, 1.35
== v1.20
| 1.33, 1.34, 1.35, 1.36
Awkward: since Day 6 the cluster has been running on v1.36, but Cilium 1.19 is only tested up to v1.35. The right order would have been: first Cilium to 1.20, then Kubernetes to v1.36. It worked anyway, nothing was broken. But “untested” means: if something breaks, nobody will help you. So this belongs in the approval from Day 5:
| Check before every Kubernetes upgrade |
|---|
| Does every add-on support the target version? If not, upgrade the add-on first. |
And looking ahead to tomorrow: Cilium 1.20 ends at v1.36. The upgrade to v1.37 on Day 9 leaves the tested combination, and a newer Cilium version does not exist yet. In other courses of this series, Cilium 1.20.5 ran on kubeadm v1.37 without any issues. In production you would wait for the next Cilium version.
Helm does not protect you here:
helm show chart cilium/cilium --version 1.20.5 | grep -i kubeVersionExpected:
kubeVersion: '>= 1.21.0-0'
The chart only requires a minimum version. There is no upper limit anywhere; Helm would also install Cilium 1.20 on v1.40.
Save your progress? Sign up for free
Drill 2: Save the values
In its upgrade guide, Cilium explicitly warns against
--reuse-values between minor versions: new values of the
new version would be ignored. Instead, put your own values in a
file:
helm get values cilium --namespace=kube-system -o yaml > werte.yaml
echo 'upgradeCompatibility: "1.19"' >> werte.yaml
cat werte.yamlExpected:
ipam:
mode: kubernetes
operator:
replicas: 2
upgradeCompatibility: "1.19"
upgradeCompatibility names the version Cilium was
originally installed with. Cilium then keeps defaults that have changed
since, and disturbs the data path less during the upgrade.
Save your progress? Sign up for free
Drill 3: The preflight check
Without preparation, Kubernetes stops the old Cilium Pod, then pulls the new image, and only then starts it. During that time nobody manages the node’s network. The preflight check pulls the images onto all nodes beforehand:
helm template cilium cilium/cilium --version 1.20.5 --namespace kube-system \
--set preflight.enabled=true --set agent=false --set operator.enabled=false \
> cilium-preflight.yaml
kubectl create -f cilium-preflight.yaml
kubectl -n kube-system rollout status ds/cilium-pre-flight-check
kubectl -n kube-system rollout status deploy/cilium-pre-flight-check
kubectl get daemonset -n kube-system | sed -n '1p;/cilium/p'Expected (abridged):
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELE…
cilium 3 3 3 3 3 kubernete…
cilium-envoy 3 3 3 3 3 kubernete…
cilium-pre-flight-check 3 3 3 3 3 kubernete…
kubectl get deployment -n kube-system cilium-pre-flight-check
kubectl delete -f cilium-preflight.yamlExpected:
NAME READY UP-TO-DATE AVAILABLE AGE
cilium-pre-flight-check 1/1 1 1 112s
The Deployment also checks whether your existing
CiliumNetworkPolicies are valid with the new version. If it shows
0/1, you stop here.
Save your progress? Sign up for free
Drill 4: Cilium 1.20 under load
kubectl -n demo delete pod last
sed "s#http://web.demo#http://shop.demo#" ~/day2/tag00/last.yaml | kubectl apply -f -
kubectl -n demo wait --for=condition=Ready pod/last
helm upgrade cilium cilium/cilium --version 1.20.5 --namespace kube-system -f werte.yaml
kubectl -n kube-system rollout status ds/cilium
kubectl -n kube-system rollout status ds/cilium-envoy
kubectl -n kube-system rollout status deploy/cilium-operatorExpected (abridged, 39 seconds in the lab):
Release "cilium" has been upgraded. Happy Helming!
...
REVISION: 2
...
daemon set "cilium" successfully rolled out
daemon set "cilium-envoy" successfully rolled out
deployment "cilium-operator" successfully rolled out
kubectl -n demo logs last | wc -l
kubectl -n demo logs last | awk '$2 != 200' | wc -l
kubectl -n kube-system exec ds/cilium -c cilium-agent -- cilium-dbg version
kubectl -n kube-system exec ds/cilium -c cilium-agent -- cilium-dbg status --briefExpected:
208
0
Client: 1.20.5 15012141 2026-11-16T23:56:02Z go version go1.26.11 linux/amd64
Daemon: 1.20.5 15012141 2026-11-16T23:56:02Z go version go1.26.11 linux/amd64
OK
0 errors, even though the network agent restarted on every node. Existing connections and service rules live in the kernel as eBPF programs and keep running, even while the agent is briefly gone. The agent manages the data path; it is not the data path.
Save your progress? Sign up for free
Drill 5: metrics-server – the lost customization
metrics-server was installed from a manifest on Day 0 and then
patched with --kubelet-insecure-tls. Now the new version,
as described in the project’s instructions:
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/\
download/v0.9.1/components.yaml
kubectl -n kube-system rollout status deploy/metrics-server --timeout=90sExpected (abridged):
deployment.apps/metrics-server configured
Waiting for deployment "metrics-server" rollout to finish: 1 old replicas are pending
termination...
error: timed out waiting for the condition
kubectl -n kube-system get deploy metrics-server \
-o jsonpath='{.spec.template.spec.containers[0].args}{"\n"}'
kubectl -n kube-system get pods -l k8s-app=metrics-serverExpected:
["--cert-dir=/tmp","--secure-port=10250","--kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname","--kubelet-use-node-status-port","--metric-resolution=15s"]
NAME READY STATUS RESTARTS AGE
metrics-server-5f54fb74d9-8k92n 1/1 Running 0 36m
metrics-server-64cf6c55d8-9cc5d 0/1 Running 0 91s
The manifest replaced the arguments completely;
--kubelet-insecure-tls is gone. The new Pod cannot query
the kubelets:
kubectl -n kube-system logs metrics-server-64cf6c55d8-9cc5d | grep -m1 x509 | cut -c1-170Expected:
E1121 21:19:15.820037 1 scraper.go:149] "Failed to scrape node" err="Get \"https://1
72.16.0.83:10250/metrics/resource\": tls: failed to verify certificate: x509: cannot vali
And yet kubectl top nodes keeps working. The old Pod is
running because the new one never became ready. The readiness probe of
metrics-server and the rolling update prevented an outage, just like
with shop on Day 3. Fix:
kubectl -n kube-system patch deploy metrics-server --type=json -p \
'[{"op":"add","path":"/spec/template/spec/containers/0/args/-",
"value":"--kubelet-insecure-tls"}]'
kubectl -n kube-system rollout status deploy/metrics-server
kubectl top nodesExpected:
deployment.apps/metrics-server patched
deployment "metrics-server" successfully rolled out
NAME CPU(cores) CPU(%) MEMORY(bytes) MEMORY(%)
cp1 752m 18% 1186Mi 10%
cp2 573m 28% 1788Mi 46%
cp3 576m 28% 1901Mi 49%
The lesson: a customization that exists only in the cluster is gone at the next upgrade. Record it as a file: a Helm value, a Kustomize patch, or at least a patch command in the upgrade log. On Day 10 you make the flag unnecessary altogether.
Save your progress? Sign up for free
Drill 6: The way back for Cilium
Helm has stored every version:
helm history cilium -n kube-systemExpected:
REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION
1 Sat Nov 21 19:09:02 2026 superseded cilium-1.19.11 1.19.11 Install complete
2 Sat Nov 21 21:17:19 2026 deployed cilium-1.20.5 1.20.5 Upgrade complete
You practice the way back in the challenge.
Save your progress? Sign up for free
Exercise: Speed Drills
- Show the images of all Cilium components. Target time: 1 min
- Show the values of the currently running Helm revision of Cilium. Target time: 1 min
- Check which Kubernetes versions metrics-server 0.9 supports. Target time: 3 min
Solution
kubectl -n kube-system get ds,deploy -o custom-columns=NAME:.metadata.name,\
IMAGE:.spec.template.spec.containers[0].image | grep cilium | cut -c1-70
helm get values cilium -n kube-systemcilium quay.io/cilium/cilium:v1.20.5@sha256:aa72499f075ad729947ea91b0
cilium-envoy quay.io/cilium/cilium-envoy:v1.39.6-1794557904-dee711ff0e84b10
cilium-operator quay.io/cilium/operator-generic:v1.20.5@sha256:c6e7de6665aa970
For metrics-server, the compatibility table is in the project’s README on GitHub (section “Compatibility Matrix”).
Save your progress? Sign up for free
Checkpoint
helm list -n kube-systemExpected: cilium with
cilium-1.20.5, status deployed.
kubectl -n kube-system get deploy metrics-server \
-o jsonpath='{.spec.template.spec.containers[0].image}{"\n"}'
kubectl top nodes | head -2Expected:
registry.k8s.io/metrics-server/metrics-server:v0.9.1 and
one line with values per node.
Challenge
Prove that the way back works: roll Cilium back to 1.19 under load
and then upgrade it to 1.20 again, without losing a single request to
shop.
Hint: helm rollback expects the
revision number you want to go back to.
Solution
kubectl -n demo delete pod last
sed "s#http://web.demo#http://shop.demo#" ~/day2/tag00/last.yaml | kubectl apply -f -
kubectl -n demo wait --for=condition=Ready pod/last
helm rollback cilium 1 -n kube-system
kubectl -n kube-system rollout status ds/cilium
kubectl -n kube-system exec ds/cilium -c cilium-agent -- cilium-dbg version | tail -1
helm upgrade cilium cilium/cilium --version 1.20.5 --namespace kube-system -f werte.yaml
kubectl -n kube-system rollout status ds/cilium
kubectl -n demo logs last | awk '$2 != 200' | wc -l
helm history cilium -n kube-systemExpected (abridged):
Rollback was a success! Happy Helming!
daemon set "cilium" successfully rolled out
Daemon: 1.19.11 0ea77482 2026-11-16T13:43:38+00:00 go version go1.26.11 linux/amd64
daemon set "cilium" successfully rolled out
0
REVISION UPDATED STATUS CHART APP VERSION DESCRIPTION
1 Sat Nov 21 19:09:02 2026 superseded cilium-1.19.11 1.19.11 Install complete
2 Sat Nov 21 21:17:19 2026 superseded cilium-1.20.5 1.20.5 Upgrade complete
3 Sat Nov 21 21:22:04 2026 superseded cilium-1.19.11 1.19.11 Rollback to 1
4 Sat Nov 21 21:22:52 2026 deployed cilium-1.20.5 1.20.5 Upgrade complete
To Helm, a rollback is just a new revision with old values. Back and forth, the network plugin swapped twice, not a single request lost.
Save your progress? Sign up for free
Cleanup
rm -f ~/day2/tag08/cilium-preflight.yamlKeep werte.yaml (“values.yaml”). From now on it is the
basis of every Cilium upgrade.
Interview Note
- Why not
helm upgrade --reuse-values? Because the values of the old revision are carried over and new defaults of the new chart version are ignored. Between minor versions, this can render the templates incorrectly. - How do you find out whether an add-on works with the new Kubernetes version? From the project’s compatibility list, not from Helm. Charts often only have a minimum version.
- What happens to the network while the Cilium agent restarts? Existing traffic keeps flowing through the eBPF programs in the kernel. New endpoints and policies wait until the agent is back.
Enterprise Note
- Add-ons are usually managed through GitOps (Argo CD, Flux) with pinned versions and values. Then the customization from Drill 5 is in the repository and does not get lost.
- The compatibility list of all add-ons is a fixed part of upgrade planning. The slowest add-on determines when Kubernetes may be upgraded.
- The network plugin often gets its own test cluster, because a fault there hits all workloads at once.