Skip to main content

Kubectl notes (WIP)

Drain nodes

Drain node

kubectl drain host.name.local --ignore-daemonsets

Put node back to ready

kubectl uncordon host.name.local

Replace a new node

 Delete a node

kubectl delete node [node_name]

Generate a new token:

kubeadm token generate

List the tokens:

kubeadm token list

Print the kubeadm join command to join a node to the cluster:

kubeadm token create [token_name] --ttl 2h --print-join-command