talira

Best-practice fast paths for creating Kubernetes clusters with kubeadm init and kubeadm join

open sourceApache-2.0self-hostablefree

kubeadm is the Kubernetes project's own tool for bootstrapping a minimum viable, conformant cluster on machines you already have: kubeadm init sets up a control-plane node and kubeadm join adds worker or further control-plane nodes, with commands to upgrade the cluster, manage certificates and join tokens, and reset a host. By design it only bootstraps: it doesn't provision machines, install a pod network, or add a dashboard, monitoring or cloud-specific add-ons, and it expects a container runtime such as containerd or CRI-O and matching kubelet and kubectl versions to be installed already. Higher-level installers are meant to build on it. It's maintained by Kubernetes SIG Cluster Lifecycle, its code lives in the main Kubernetes repository under Apache-2.0, and packages come from pkgs.k8s.io.

Problems it solves

  • set up a vanilla upstream Kubernetes cluster by hand on my own Linux servers
  • learn how a Kubernetes control plane is put together by building one step by step
  • turn a handful of VMs into a conformant cluster with one command on the first node and one on the others
  • add more worker nodes to an existing self-built cluster with a join token
  • upgrade my self-managed cluster's control plane to the next Kubernetes minor version
  • renew or rotate the control plane certificates before they expire
  • build a highly available control plane with stacked or external etcd on bare metal
  • a building block for my own cluster installer or automation instead of scripting the control plane setup
  • undo everything a failed cluster bootstrap did to a host and start over
  • install Kubernetes on ARM, ppc64le or s390x machines from official packages

Features

  • kubeadm init bootstraps a control-plane node; kubeadm join adds worker and control-plane nodes
  • kubeadm upgrade for cluster version upgrades
  • kubeadm certs to manage cluster certificates, and kubeadm token for bootstrap tokens
  • kubeadm reset reverts changes made to a host
  • highly available topologies with stacked or external etcd
  • detects an installed CRI runtime (containerd, CRI-O, or Docker Engine through cri-dockerd)
  • pre-flight checks, including kernel verification
  • deb and rpm packages from pkgs.k8s.io and binaries for amd64, arm, arm64, ppc64le and s390x
  • generally available (GA) feature state

Limitations

  • Doesn't provision machines or install add-ons such as a dashboard, monitoring or cloud integrations: it only bootstraps the cluster1
  • Doesn't install a pod network (CNI) plugin: you deploy one after kubeadm init, and cluster DNS won't start until you do2
  • Doesn't install or manage the kubelet, kubectl or a container runtime: you install matching versions on each node first3

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what kubeadm does.

  1. Kubespray Deploy a Production Ready Kubernetes Cluster
  2. RKE2 Rancher's enterprise-ready next-generation Kubernetes distribution, focused on security and compliance
  3. k0s The Simple, Solid & Certified Kubernetes Distribution
  4. kOps The easiest way to get a production grade Kubernetes cluster up and running
  5. K3s Lightweight Kubernetes. Easy to install, half the memory, all in a binary of less than 100 MB.
  6. Gardener Homogeneous Kubernetes clusters at scale on any infrastructure using hosted control planes.

Compare kubeadm with the top 3