Node Lifecycle — conditions and taints that affect Pod scheduling.
1# Node with taints2apiVersion: v13kind: Node4metadata:5 name: gpu-node6spec:7 taints:8 - key: nvidia.com/gpu9 effect: NoSchedule10 value: "present"11 - key: node.kubernetes.io/not-ready12 effect: NoExecute13 value: "true"14 tolerationSeconds: 30015 unschedulable: false16 providerID: aws:///us-west-2a/i-1234567890abcdef0
1# Check node conditions2kubectl get nodes -o custom-columns=3 NAME:.metadata.name,4 STATUS:.status.conditions[-1].type,5 READY:.status.conditions[-1].status,6 AGE:.metadata.creationTimestamp78# Detailed conditions9kubectl describe node node-1 | grep -A 10 "Conditions:"1011# Taints and tolerations12kubectl describe node node-1 | grep -A 5 "Taints:"1314# Cordon (mark unschedulable)15kubectl cordon node-116kubectl uncordon node-11718# Drain (evict Pods, then cordon)19kubectl drain node-1 --ignore-daemonsets --delete-emptydir-data --force20kubectl drain node-1 --ignore-daemonsets --force --timeout=300s2122# Label and annotate23kubectl label node node-1 disktype=ssd24kubectl annotate node node-1 node.alpha.kubernetes.io/ttl=0
Conditions:
Taint Effects: