LAB03a: Kubernetes Lifecycle Management Lab (v1.33 → v1.34)

Cluster Topology

Role
Hostname
kube version
CNI
OS

Control plane

master

1.33.x

Calico

Ubuntu 24.04

Worker node

node1

1.33.x

Calico

Ubuntu 24.04

PART 1 — Install containerd

Installation guidearrow-up-right

PART 2 — Create a Test Deployment

We use nginx:

kubectl create deployment web --image=nginx --replicas=3
kubectl get pods -o wide

PART 3 — Node Lifecycle Management

1️ Cordon the node

kubectl cordon node1

Expected behavior

  • No new pods will be scheduled to node1.

  • Existing pods continue running, not disturbed.

Verify:

2️ Drain the node

What happens now?

✔ Kubernetes evicts pods on node1 ✔ Scheduler moves pods to master (if resources available) ✔ If cluster cannot schedule → pods stay in Pending

Watch:

PART 4 — Node Crash Simulation

Simulate crash:

Observe:

Expected behavior:

⏱ After ~40 seconds: NotReady ⏱ After grace period: Pods on that node are terminated and rescheduled ❗ Except DaemonSets — they remain because they’re node-local ✔ Calico will mark node as "down" in BGP

Check pod movement:

PART 5 — Upgrade Cluster to v1.34

1️ Upgrade Master Node

Unhold and install new kubeadm:

Check plan:

Apply:

Upgrade kubelet and kubectl:

Check:

2️ Upgrade Worker Node

Drain:

Upgrade kubeadm:

Upgrade kubelet:

Uncordon:


PART 6 — Add a NEW Node (v1.34)

From master:

Run the join command on new node (node2), which already has v1.34 installed.


PART 7 — Test Scheduling After Upgrade

✔ Pods should now be well distributed across upgraded nodes.


What Students Learn

✔ Kubernetes lifecycle fundamentals ✔ How cordon/drain affects scheduling ✔ Pod evacuation + rescheduling ✔ BGP/Calico behavior when node goes down ✔ How Kubernetes handles node crash ✔ Clean cluster upgrade from v1.33 → v1.34 ✔ Node join workflow in real production

References:

Last updated