Playbook for planning and executing a safe Kubernetes control-plane and node-pool upgrade, covering version-skew rules, pre-flight checks, node drain sequencing, and capacity planning for node pools. Prevents the most common upgrade-day outages.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cloud-native-kubernetes:cluster-upgrade-and-capacityThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
| Component pair | Max skew |
| Component pair | Max skew |
|---|---|
| kube-apiserver ↔ kubelet | kubelet may be at most 2 minor versions behind apiserver |
| kube-apiserver ↔ kube-controller-manager / kube-scheduler | Must be same minor version |
| kubectl ↔ kube-apiserver | kubectl may be ±1 minor version |
| Helm chart API versions | Must target APIs present in the target cluster version |
Upgrade order: control plane first, then node pools one at a time.
Run these before touching anything:
kubectl get nodes — all nodes Ready; no NotReady or Unknownkubectl api-resources --verbs=list + run pluto or kubectl deprecations against manifestsValidatingWebhookConfiguration and MutatingWebhookConfiguration: set failurePolicy: Fail webhooks will block upgrades if their endpoint is downkubectl get pdb -A)1. Upgrade control plane (managed: click/Terraform; self-managed: kubeadm upgrade apply)
2. Cordon + drain node 1 of pool A → confirm pod reschedule → upgrade node → uncordon
3. Repeat for remaining nodes in pool A (rolling — respect PDBs)
4. Upgrade node pool B (if separate), same rolling procedure
5. Upgrade add-ons to versions compatible with the new control plane
6. Run smoke tests against the cluster API and critical workloads
Drain flags:
kubectl drain <node> \
--ignore-daemonsets \ # DaemonSet pods are managed separately
--delete-emptydir-data \ # Evict pods using emptyDir (data is lost — intentional)
--timeout=300s
Required nodes = ceil( sum(all-pod-requests) / (node-allocatable × target-utilization) )
node-allocatable = node capacity minus OS/kubelet/system reserved (check kubectl describe node)target-utilization = 0.70 for CPU, 0.80 for memory (headroom for burst and rolling upgrades)| Input | Where to get it |
|---|---|
| Observed p99 CPU/mem per replica | Prometheus / CloudWatch Container Insights |
| Traffic multiplier at peak | Load test or prod traffic pattern |
| Pod startup time | kubectl describe pod → container start latency |
Set minReplicas ≥ 2 (single replica = planned outage during upgrade).
| Factor | Cluster Autoscaler | Karpenter |
|---|---|---|
| Node provisioning granularity | Node group / ASG | Any instance type that fits |
| Speed | 1–3 min (ASG warm) | 30–90 s (direct EC2 API) |
| Bin-packing | Limited | Aggressive consolidation |
| Multi-cloud | Yes | AWS-native (Azure/GCP in progress) |
Use Karpenter on EKS when bin-packing efficiency and speed matter; use CA otherwise.
kubectl get nodes # all Ready, correct version
kubectl get pods -A | grep -v Running # no CrashLoopBackOff / Pending
kubectl top nodes # resource usage sane
kubectl get events -A --sort-by=.lastTimestamp | tail -50
Smoke-test critical services and verify SLO dashboards show no degradation for 15 minutes before declaring success.
v1beta1 removed in 1.25 / 1.26 breaks apply on upgrade day.failurePolicy: Fail webhooks whose backend pod is on the node being drained — the drain blocks and the upgrade hangs.maxUnavailable: 1 PDBs — drain waits forever for a pod that can't move.Pending.npx claudepluginhub mcorbett51090/ravenclaude --plugin cloud-native-kubernetesGuides completion of development work by verifying tests, detecting environment, and presenting structured options for merge, PR, or cleanup.
Enforces test-driven development: write failing test first, then minimal code to pass. Use when implementing features or bugfixes.
Guides creation and editing of skills using test-driven development with pressure scenarios and subagents to verify agent compliance.