Sub topic 14
Verifying the cluster after the upgrade
This chapter assumes you can use kubectl, know the control plane and worker node roles, and have just finished upgrading a kubeadm cluster. A command that exits cleanly does not prove the cluster works. Verification is a short, repeatable set of checks. Their results tell you whether to keep going or to start recovery.
What to check, in order
Check from the bottom up. Control plane problems make node and workload results unreliable, so look at them first.
Check versions and node health
Confirm that the server and every node report the new version.
kubectl version
kubectl get nodes -o wideEvery node should show Ready and the target version in the VERSION column. A node that is still Ready,SchedulingDisabled was drained but never uncordoned. Run kubectl uncordon <node-name> to fix it.
Check system components
Look at the control plane and add-on Pods in kube-system.
kubectl get pods -n kube-system
kubectl get --raw='/readyz?verbose' | tail -n 20The /readyz?verbose endpoint lists each API server health check. Every line should end in ok. Look for Pods in CrashLoopBackOff or Pending. A CNI or kube-proxy Pod in that state breaks networking for every workload.
Check workloads
Compare the workload state with what you recorded before the upgrade.
kubectl get deployments,statefulsets,daemonsets -A
kubectl get pods -A --field-selector=status.phase!=Running,status.phase!=SucceededThe second command lists Pods that are neither running nor completed. Some may be normal, for example Pods that were already pending before the upgrade. Anything new needs investigation. Then test one real request path, such as reaching a Service through its Ingress.
Check for API problems
Make sure clients are not still calling APIs that are now removed.
kubectl get --raw /metrics | grep apiserver_requested_deprecated_apisAlso read the logs of controllers and operators for errors about unknown resource versions.
Decide: continue, fix, or roll back
| Symptom | Likely action |
|---|---|
| One add-on Pod failing | Fix forward. Read the logs and check add-on compatibility. |
| Node stuck `NotReady` after kubelet restart | Check `systemctl status kubelet` and the kubelet logs on that node. |
| API server unhealthy or etcd errors | Stop and use the etcd snapshot recovery path. |
| Widespread workload failures | Pause further upgrades and investigate before changing anything else. |
Kubernetes does not support downgrading, so restoring the etcd snapshot is the main recovery option. It is also disruptive, so try to fix forward when the failure is limited to a single component.
Exercise
After upgrading, kubectl get nodes shows every node as Ready at the new version, but users report that the website returns errors. Which checks do you do next, and why?
Show answer
Node status only shows that kubelets are healthy. Check the kube-system Pods (CNI, kube-proxy, CoreDNS) for failures. Check the ingress controller Pods and logs. Look for new non-running Pods across all namespaces. Send a real request through the Ingress to the Service. Also check the apiserver_requested_deprecated_apis metric and controller logs for removed API versions. Fix a single failing component forward if possible, and consider an etcd restore only if the control plane itself is broken.