kubeadm is a command-line tool for bootstrapping and maintaining a Kubernetes cluster. It creates cluster components, including the certificate authority and certificates needed for secure communication. Unlike kubectl, which manipulates Kubernetes objects, kubeadm handles cluster setup and lifecycle tasks. section 1.7 section 2.0
Match the command to the administrator task:
- Plan an upgrade: run `kubeadm upgrade plan` on the control plane to see current component versions and available targets. The target is limited by the installed kubeadm version; upgrade the kubeadm package first if the required target is higher. section 2.1.1
- Add a node: run `kubeadm token create --print-join-command` to generate a join command, run that command on the joining node, then check `kubectl get nodes` for `Ready`. section 5.2.2
- Reprepare a previously joined node: `kubeadm reset` reverts changes made on that host by `kubeadm init` or `kubeadm join`. Read its warnings before proceeding. section 5.2.2
root@kind-control-plane:/# kubeadm token create --print-join-command kubeadm join kind-control-plane:6443 --token l5kotg.hiivo73eu000bbfu --discovery-token-ca-cert-hash sha256:13b3aac808908114d45b6ad91640babd8613d8136b21d405711a1204c68fa8a4
This command output shows the join command generated with a bootstrap token and a discovery CA certificate hash. Use the generated command for the node being added. section 5.2.2
For hands-on practice, use a kubeadm-built cluster, inspect an upgrade plan, and verify a joined node from the control plane. `kubeadm --help` can provide command examples when the exact syntax is needed. section 2.1.1 section 5.2.2
