AdvancedLesson 29 of 35
Capacity and availability
Keep apps up during scaling, drains and failures.
- Cluster Autoscaler / Karpenter add and remove nodes based on pending pods.
- Vertical Pod Autoscaler recommends or sets requests.
- PodDisruptionBudget limits how many pods can be down during voluntary disruptions like node drains.
- Spread replicas across nodes and zones.
yaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata: { name: web }
spec:
minAvailable: 2
selector: { matchLabels: { app: web } }bash
kubectl drain node1 --ignore-daemonsets --delete-emptydir-data
kubectl uncordon node1