liveBook · Manning

Kubeadm

As explained in Acing the Certified Kubernetes Administrator Exam, Second Edition

A Kubernetes command-line tool for creating and configuring the components of a Kubernetes cluster.

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

How Acing the Certified Kubernetes Administrator Exam, Second Edition covers it

How deep it goes
Works through upgrade planning and token-based node joins, but does not detail certificate creation internals.
Examples
Uses `kubeadm upgrade plan` and a generated `kubeadm join` command, with `kubectl get nodes` to verify readiness.
What it assumes
Assumes access to a cluster and control plane shell; offers kind as a way to create a local practice cluster.
What you can do after
Operate/configure kubeadm to plan control plane upgrades and generate a node join command, then verify the node is Ready.
How it connects
Connects kubeadm to public key infrastructure, bootstrap tokens, the Kubernetes API, control plane components, and kubectl.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Acing the Certified Kubernetes Administrator Exam, Second Edition. The section links point to the parts of the book it draws on.