## Introduction

kubeadm cluster administration is the day-two discipline of a self-managed Kubernetes cluster: joining nodes, draining them for maintenance, upgrading versions in a safe order, renewing certificates, and recovering failures. This lesson gives each task a sequence, the prechecks that prevent self-inflicted outages, and the verification that proves the cluster is healthy afterward.

Illustrative composite: an engineer upgrades a three-node cluster by patching every node in one evening, workers first because they looked easier. The newer kubelets register against an older API server, two nodes flap NotReady, and a drain stalls on a PodDisruptionBudget nobody remembered creating. The cluster recovers, but the maintenance window becomes an incident. Every step was a documented command. The failure was sequencing and missing prechecks, which is what this lesson fixes.

This lesson follows Kubernetes CRDs and operators, where the focus was extending the API. Here the focus drops a level, to the machines and control plane that store and run everything. Managed services hide most of this work; kubeadm clusters expose it, which is why kubeadm remains the best way to learn what a control plane actually does during an upgrade. The Kubernetes architecture lesson maps those components before you operate them.

The 5-minute takeaway

Treat every node operation as drain, change, verify, uncordon, in that order, one node at a time. Upgrade the control plane before workers, move one minor version at a time, and take an etcd snapshot before you touch anything. Check PodDisruptionBudgets and certificate expiry during prechecks, not during the maintenance window.


1. kubeadm cluster administration: know your cluster layout first

kubeadm cluster administration starts with an accurate picture of the cluster: which nodes run the control plane, whether etcd is stacked or external, which versions are installed, and where certificates live. Most failed maintenance begins with a wrong assumption about layout, so inventory the cluster before changing it.

Run kubectl get nodes -o wide and note roles, versions, and internal addresses. The kubectl master guide covers the inspection commands used throughout this lesson. On a control-plane node, look at /etc/kubernetes/manifests to see the static Pods kubeadm manages: API server, controller manager, scheduler, and usually etcd. If etcd runs as a static Pod on each control-plane node, you have stacked etcd, and control-plane nodes carry both API and datastore duties. That layout decides how many control-plane nodes you can lose and how upgrades must be sequenced.

Record versions precisely. kubeadm version, kubelet --version, and kubectl version can all differ, and the differences matter during upgrades. Kubernetes supports a version skew: kubelets may lag the API server by up to two minor versions, but must never be newer than the API server. Writing the current versions into the change ticket sounds bureaucratic until a half-finished upgrade needs a rollback decision at midnight.

Also confirm where cluster state and credentials live. The admin kubeconfig is /etc/kubernetes/admin.conf on control-plane nodes. Certificates sit under /etc/kubernetes/pki. Node configuration lives in /var/lib/kubelet. Knowing these paths turns vague incidents into concrete checks, and it is the same map the recovery sections later in this lesson rely on.


2. kubeadm cluster administration: joining worker nodes safely

kubeadm cluster administration joins workers with a bootstrap token and a CA certificate hash so the new node can verify it is talking to the real control plane. Generate a fresh join command on a control-plane node, run it on the worker, then verify the node reports Ready and accepts a test Pod before calling the join done.

Create the join command with kubeadm token create --print-join-command on a control-plane node. The output contains the API server endpoint, a short-lived token, and the discovery token CA cert hash. Treat that command as a credential: it lets a machine join your cluster, so move it over a trusted channel and let it expire rather than pasting it into a wiki. Tokens default to a 24-hour lifetime, which is already generous.

On the worker, prepare the host before joining: container runtime installed and running, swap disabled or kubelet configured for it, required kernel modules and sysctls set, and time synchronised. Most join failures are host preparation failures wearing a kubeadm costume. The node joins, the kubelet starts, and then the node stays NotReady because the CNI plugin has no config or the runtime socket path is wrong.

bash
# On a control-plane node
kubeadm token create --print-join-command

# On the new worker, using the printed command
sudo kubeadm join 10.0.0.10:6443 \
  --token abcdef.0123456789abcdef \
  --discovery-token-ca-cert-hash sha256:9f2c...e41a

# Verify from any admin workstation
kubectl get nodes -o wide
kubectl run join-check --image=busybox:1.36 --restart=Never -- sleep 30

Verify with evidence, not optimism. The node should show Ready, the CNI Pod on it should be Running, and a test Pod should schedule and start. Check kubectl describe node for taints and conditions. A node that joined but cannot run Pods is not capacity; it is a future scheduling mystery. The networking lesson on CNI plugins explains what the node needs before Pods get addresses.


3. kubeadm cluster administration: joining control-plane nodes

kubeadm cluster administration adds control-plane nodes with a certificate key that lets the new node download the cluster CA and join as a peer, not just a worker. Generate the key with kubeadm init phase upload-certs, join with --control-plane, and verify etcd membership and API server health before trusting the new node.

Control-plane joins differ from worker joins in one critical way: the new node needs the cluster's certificate authority keys so it can serve the API and join etcd as a member. kubeadm init phase upload-certs --upload-certs stores those certificates in a Secret, encrypted with a certificate key that expires after two hours. Generate the key close to the join, and never reuse an old one from a runbook screenshot.

An odd number of control-plane nodes matters because etcd needs quorum. Three nodes tolerate one failure; two nodes tolerate none and are worse than one for availability. Plan control-plane count as one, three, or five, and spread them across failure domains. Adding a second control-plane node to a single-node cluster is a reasonable step, but the cluster only gains fault tolerance when the third arrives.

After the join, verify from the new node's perspective. kubectl get nodes should list it with the control-plane role. Check etcd member health from a control-plane node, and confirm the API server answers through the load balancer or endpoint users actually use, not just locally. A control-plane node that joined etcd but is missing from the load balancer pool adds quorum risk without adding availability.


4. kubeadm cluster administration: cordon and drain without surprises

kubeadm cluster administration uses cordon to stop new Pods landing on a node and drain to evict running Pods gracefully through the Eviction API. Drain respects PodDisruptionBudgets, which is correct behaviour and also the usual reason a drain appears stuck. Always know which workloads cannot move before you start.

kubectl cordon marks the node unschedulable and leaves Pods running; it is the right first step when you want to stop new placements while you investigate. kubectl drain cordons and then evicts Pods, honouring graceful termination periods and PodDisruptionBudgets. DaemonSet Pods need --ignore-daemonsets, and Pods using emptyDir need --delete-emptydir-data after you accept that local data will be lost.

Precheck the node before draining. List its Pods with kubectl get pods -A -o wide --field-selector spec.nodeName=<node> and look for single-replica workloads, Pods with local storage, and Pods not managed by a controller. Check PodDisruptionBudgets with kubectl get pdb -A; a budget with maxUnavailable: 0 will block eviction forever, by design. Finding that in prechecks takes a minute. Finding it mid-drain, with a maintenance window closing, takes considerably longer.
Drain message Usual cause Safe response
Would violate the pod's disruption budget PDB allows no voluntary disruption right now Scale the workload up, wait for a healthy replica, or fix the budget
Cannot delete Pods not managed by a controller Bare Pod with no owner Confirm it can be lost, then delete it deliberately
Cannot delete Pods with local storage emptyDir data would be lost Accept the loss explicitly or move the workload first
Pod stays Terminating Finalizer, stuck process, or dead kubelet Check events and node health before forcing anything

Never reach for --force as a first response. Force deletion bypasses the protections that keep stateful workloads safe; a StatefulSet Pod force-deleted while its process still runs on a partitioned node can create two writers. Force is for confirmed-dead nodes and Pods you have verified can be lost. The drain is telling you something. Read it.


5. kubeadm cluster administration: the upgrade order that keeps clusters alive

kubeadm cluster administration upgrades follow a fixed order: control plane first, then workers, one minor version at a time. Within each node, upgrade the kubeadm package first, run the kubeadm upgrade step, then upgrade kubelet and kubectl and restart the kubelet. Breaking this order is how routine upgrades become incidents.

Version skew rules explain the order. Kubelets must not be newer than the API server, so workers upgraded first can fail to register or behave unpredictably. The control plane moves first, then kubelets follow within their supported lag. Minor versions also move one step at a time: 1.31 to 1.32 to 1.33, never skipping, because API removals and storage migrations assume each intermediate version ran.

On the first control-plane node, the sequence is: upgrade the kubeadm package to the target version, run kubeadm upgrade plan and read it, then kubeadm upgrade apply v1.32.x. The plan output is not decoration; it flags components needing manual attention, such as etcd or CNI considerations. On additional control-plane nodes, use kubeadm upgrade node instead of apply. Running apply on more than one control-plane node is a classic error with confusing symptoms.

Workers come last, one at a time: drain, upgrade kubeadm, run kubeadm upgrade node, upgrade kubelet and kubectl, restart kubelet, verify Ready, uncordon, and wait for workloads to settle before the next node. The patience is the point. Each node returns to service and proves itself before you take capacity away again. A rolling upgrade done this way is boring, which is the highest compliment operations work can earn.


6. kubeadm cluster administration: upgrade prechecks and backups

kubeadm cluster administration upgrades begin before the first package changes: take an etcd snapshot, check for deprecated APIs in use, confirm PodDisruptionBudgets allow drains, and verify every node is Ready. An upgrade started on an unhealthy cluster turns small problems into version-skew problems that are harder to reason about.

The etcd snapshot is your way back. Take it with etcdctl snapshot save, verify it, and copy it off the control-plane node before upgrading. The next lesson covers etcd backup and restore in full; for upgrades, the rule is simple: no verified snapshot, no upgrade. Also back up /etc/kubernetes/pki and the kubeadm configuration, because a snapshot without certificates still leaves you rebuilding trust material by hand.

Check API deprecations against the target version. Removed APIs break workloads and operators silently until something tries to use them. Tools such as kubectl get --raw /metrics deprecation warnings, or dedicated scanners, show which clients still call removed versions. Read the target version's release notes for kubelet and control-plane changes that affect your add-ons, especially CNI and CSI plugins, which kubeadm does not upgrade for you.

Precheck Command or source Pass condition
Cluster health kubectl get nodes and kubectl get pods -A All nodes Ready, no unexplained Pending Pods
etcd snapshot etcdctl snapshot save plus status check Snapshot verified and copied off-node
Drain feasibility kubectl get pdb -A Budgets allow voluntary disruption
Deprecated APIs Release notes and API usage metrics No clients on removed API versions
Certificate expiry kubeadm certs check-expiration No certificate expiring inside the window

Finally, confirm capacity. Draining one node at a time assumes the remaining nodes can hold its workloads. In a three-node cluster running at ninety percent requested CPU, a drain succeeds and the evicted Pods sit Pending, which reads as an upgrade failure but is really arithmetic. Check requests against allocatable capacity before the window, and scale or add capacity first if the numbers are tight.


7. kubeadm cluster administration: certificates and renewal

kubeadm cluster administration includes certificate lifecycle, because kubeadm-issued control-plane certificates expire after one year by default. Check expiry with kubeadm certs check-expiration, renew with kubeadm certs renew all or per certificate, and restart the affected static Pods so they pick up the new material.

Expired control-plane certificates present as a cluster that slowly stops trusting itself: API server errors, kubelet registration failures, and etcd peer complaints. The CA itself lasts ten years, but leaf certificates such as the API server serving certificate renew annually. Upgrades renew certificates as part of kubeadm upgrade apply, which is one more reason regular upgrades matter; a cluster left unupgraded for years is a cluster approaching a certificate cliff.

Renewal is per control-plane node. Run kubeadm certs renew all on each node, then restart the control-plane static Pods by moving their manifests out and back, or reboot the node during its drain window. Kubelet client certificates rotate automatically when the kubelet is configured for it, but the kubelet serving certificate and control-plane leaves need the kubeadm renewal path. Verify afterward with kubeadm certs check-expiration on every control-plane node, not just the first.

Put expiry on a calendar and in monitoring. A check that runs monthly and alerts at thirty days turns renewal into routine maintenance. The failure mode to avoid is discovering expiry from an outage, because renewing certificates on a cluster whose API server will not start is a much worse afternoon than renewing them on a healthy one.


8. kubeadm cluster administration: removing nodes cleanly

kubeadm cluster administration removes a node in three moves: drain it so workloads leave safely, delete the Node object, and reset the host with kubeadm reset if the machine will be reused. For control-plane nodes, also remove the etcd member and update load balancer pools, in an order that keeps quorum intact.

For a worker, drain first, then kubectl delete node. Deleting the Node object without draining leaves Pods orphaned in the API server's view and workloads unplaced until controllers notice. After deletion, run kubeadm reset on the host to remove kubelet configuration, certificates, and CNI state if the machine returns to a pool. Skipping reset and rejoining later produces a node with stale identity, which fails in confusing ways.

Control-plane removal needs quorum arithmetic. Removing one member from a three-node etcd cluster leaves two, which tolerates no further failure; add the replacement first when you can, so the cluster goes three, four, three rather than three, two, three. Remove the etcd member with etcdctl member remove, delete the Node, and take the machine out of the API load balancer. Verify etcd health after each change, not after all of them.

Document removals in the change record with the reason. Nodes removed for hardware faults sometimes reappear after repair, and the next engineer needs to know whether the host was reset or merely powered off. A node that rejoins with old certificates after its replacement is live creates duplicate identity problems that look like network faults.


9. kubeadm cluster administration: recovering a NotReady node

kubeadm cluster administration recovers NotReady nodes by working from the node outward: kubelet service, container runtime, disk and memory pressure, CNI health, then certificates. Most NotReady nodes are local host problems, not control-plane problems, so start with systemctl status kubelet and the node conditions before touching cluster state.

Read the node conditions first. kubectl describe node shows Ready, MemoryPressure, DiskPressure, and PIDPressure with reasons and timestamps. Disk pressure from image accumulation and log growth is a quiet classic: the kubelet marks the node pressured, evicts Pods, and the node flaps. Memory pressure points at workloads without limits, which the QoS and eviction lesson covers from the workload side.

Then check the kubelet itself. systemctl status kubelet and journalctl -u kubelet reveal crash loops, certificate errors, and runtime connection failures. A kubelet that cannot reach the container runtime socket reports the node NotReady with a runtime reason. A kubelet with an expired or wrong client certificate fails to register, and the fix is certificate repair, not node deletion. Resist deleting the Node object early; it destroys the evidence and rarely fixes the host.

Symptom First check Likely fix
NotReady, kubelet inactive systemctl status kubelet Fix config or certificates, restart kubelet
DiskPressure true df -h and image usage on the node Prune images, rotate logs, expand disk
NetworkUnavailable CNI Pods on the node Repair CNI config or plugin rollout
Node missing entirely Host power and kubelet registration Restore host, check join state and certificates

If the node is confirmed dead and workloads must move, delete the Node object so controllers reschedule Pods elsewhere, and treat the host as a fresh join when it returns. Confirm death first. Deleting the Node of a merely partitioned machine invites duplicate workloads, especially stateful ones, when the partition heals.


10. kubeadm cluster administration: recovering the control plane

kubeadm cluster administration recovers a failed control-plane node by restoring its static Pod manifests, certificates, and etcd membership, or by replacing the node entirely. The safe path depends on quorum: with quorum intact, rebuild the node and rejoin it; without quorum, restore etcd from snapshot first.

Static Pods are managed by the kubelet from /etc/kubernetes/manifests, so a control-plane component that will not start is usually a manifest, certificate, or etcd problem on that host. Check the kubelet logs for the static Pod, inspect the manifest kubeadm generated, and verify the certificates it references exist and are unexpired. Hand-editing generated manifests is a last resort; prefer kubeadm init phase commands to regenerate phases such as certificates or control-plane manifests cleanly.

If the node is lost but quorum survives, build a replacement: prepare the host, join it as a control-plane node, verify etcd membership and API health, then remove the dead member. This add-before-remove order keeps quorum strong throughout. The endpoint users connect to also matters; a replacement node missing from the load balancer pool is quorum weight without serving traffic.

If quorum is lost, stop and restore. The next lesson on etcd recovery covers snapshot restore in detail, and it is the correct tool here. What matters in this lesson is the decision rule: never improvise etcd membership surgery on a cluster that has lost quorum. Restore from a verified snapshot into a new data directory, bring the control plane up, and then rejoin nodes against the restored state.


11. kubeadm cluster administration: configuration and kubeadm config files

kubeadm cluster administration stays reproducible when cluster configuration lives in versioned kubeadm config files instead of shell history. Store the ClusterConfiguration, InitConfiguration, and JoinConfiguration you used, review them like code, and regenerate phases from them so a rebuilt node matches the cluster it joins.

kubeadm config print init-defaults shows the full configuration surface, and kubeadm config view reads the live ClusterConfiguration from the cluster. Keeping your config file in git means a replacement control-plane node is built from the same inputs as the original, including networking ranges, image repositories, and feature gates. Shell-history clusters drift; config-file clusters can be reviewed.

yaml
apiVersion: kubeadm.k8s.io/v1beta4
kind: ClusterConfiguration
kubernetesVersion: v1.32.2
controlPlaneEndpoint: "api.example.com:6443"
networking:
  podSubnet: 10.244.0.0/16
  serviceSubnet: 10.96.0.0/12
apiServer:
  certSANs:
    - api.example.com
    - 10.0.0.10
---
apiVersion: kubeadm.k8s.io/v1beta4
kind: JoinConfiguration
discovery:
  bootstrapToken:
    apiServerEndpoint: "api.example.com:6443"
    token: "abcdef.0123456789abcdef"
    caCertHashes:
      - "sha256:9f2c4b8d2e41a7c5f0b3d6e8a1c4f7b2d5e8a0c3f6b9d2e5a8c1f4b7d0e3a6c9f2"

Use kubeadm init phase and kubeadm join phase commands to rerun individual steps during recovery, such as regenerating certificates or rewriting the kubelet configuration. Phase commands turn a failed init from a start-over event into a repair task. Combined with stored configuration, they are how experienced administrators rebuild one control-plane node without disturbing the rest of the cluster.


12. kubeadm cluster administration: maintenance checklist

kubeadm cluster administration is safe when every operation follows the same rhythm: precheck, snapshot, drain, change one node, verify, uncordon, and record. The checklist below compresses this lesson into the sequence to run before, during, and after any join, upgrade, or recovery on a kubeadm cluster.

Maintenance discipline compounds. A team that snapshots before upgrades, drains with prechecks, and verifies each node before moving on can run a kubeadm cluster for years with boring change windows. A team that improvises order and skips verification eventually pays for it during an upgrade that coincides with a hardware fault. The checklist is short because the habits are simple; the work is refusing to skip them under time pressure. The Kubernetes best practices guide covers the wider production habits these node routines sit inside.

  • [ ] Inventory recorded: node roles, versions, etcd layout, certificate expiry
  • [ ] etcd snapshot taken, verified, and copied off the control-plane node
  • [ ] PodDisruptionBudgets and capacity checked before any drain
  • [ ] One node at a time: drain, change, verify Ready, uncordon, settle
  • [ ] Upgrades move control plane first, one minor version per pass
  • [ ] Join commands treated as credentials and allowed to expire
  • [ ] Removed nodes drained, deleted, reset, and taken out of load balancers
  • [ ] Change record updated with versions before and after

The next lesson goes deeper on the backup this checklist keeps demanding: etcd backup and restore covers snapshots, restore into a new data directory, and rehearsing recovery before you need it. Node administration keeps a cluster running; etcd recovery brings it back when running is no longer an option.

Frequently Asked Questions

What is the safe upgrade order in kubeadm cluster administration?

Upgrade the control plane first, then workers one at a time, moving one minor version per pass. On each node, upgrade the kubeadm package first, run the kubeadm upgrade step, then upgrade kubelet and kubectl and restart the kubelet. Kubelets must never be newer than the API server, which is why workers go last.

How does kubeadm cluster administration join a new worker node?

Generate a join command on a control-plane node with kubeadm token create --print-join-command, then run it on the prepared worker. The token and CA cert hash let the node verify the control plane. After joining, confirm the node is Ready, its CNI Pod is Running, and a test Pod schedules successfully before trusting the capacity.

Why does a drain hang during kubeadm cluster administration?

Usually a PodDisruptionBudget allows no voluntary disruption, a Pod uses emptyDir data, or a Pod is not managed by a controller. Read the drain output, check budgets with kubectl get pdb -A, and inspect the specific Pods on the node. Avoid force deletion until you have confirmed the Pod or node can safely be lost.

How often should kubeadm cluster administration renew certificates?

Check expiry monthly and renew before the one-year leaf certificate lifetime runs out. kubeadm certs check-expiration shows remaining time per certificate, and upgrades renew control-plane certificates as part of the apply step. Renew on every control-plane node, restart the static Pods, and verify expiry again afterward so no node is left behind.

What should kubeadm cluster administration do when a node is NotReady?

Start on the host: check kubelet status and logs, container runtime health, disk and memory pressure, and CNI Pods. Read node conditions with kubectl describe node before deleting anything. Delete the Node object only when the host is confirmed dead, because deleting a partitioned node's object can create duplicate stateful workloads.

How does kubeadm cluster administration remove a control-plane node safely?

Add the replacement first when possible so etcd quorum stays strong, then remove the old etcd member, delete the Node object, and remove the host from the API load balancer. Verify etcd health after each step. Removing members until quorum is fragile turns a routine replacement into a recovery scenario.

What backup does kubeadm cluster administration require before an upgrade?

Take an etcd snapshot, verify it with a status check, and copy it off the control-plane node. Also back up the PKI directory and kubeadm configuration. No verified snapshot means no upgrade, because the snapshot is the only reliable way back if the control plane fails mid-change.

⚡ KUBERNETES SCENARIO INTERVIEW PREP

Preparing for Senior Platform & SRE Interviews

Practice real-world cluster triage, RBAC debugging, and pod scheduling scenarios in our Kubernetes scenario interview questions hub.

Explore Interview Scenarios →