Interview Prep/Kubernetes/Rapid-Fire Commands

How do you cordon, drain and taint a node, and undo them?

IntermediateProductionRapid-Fire Commands
Answer
kubectl cordon n1
kubectl drain n1 --ignore-daemonsets --delete-emptydir-data --timeout=300s
kubectl taint nodes n1 maintenance=true:NoSchedule
kubectl taint nodes n1 maintenance=true:NoSchedule-     # trailing minus removes it
kubectl uncordon n1
All Kubernetes questions

More on Rapid-Fire Commands