Skip to main content

Install Kubernetes on Ubuntu 20.04 with kubeadm

· One min read
Apache Wangye
Software developer and technical writer

Ubuntu 20.04 is aging, so confirm support for the selected Kubernetes and container-runtime versions before deployment.

Disable swap or configure it according to the supported Kubernetes policy, load required kernel modules, and enable bridge netfilter and IP forwarding. Install and configure containerd with the systemd cgroup driver.

Install matching kubelet, kubeadm, and kubectl packages, then initialize the control plane:

sudo kubeadm init --pod-network-cidr=10.244.0.0/16

Copy the generated administrator kubeconfig for the intended user and install one CNI plugin whose address range matches the initialization settings. Do not install multiple competing CNIs.

Join workers with the token and CA hash printed by kubeadm init. Verify:

kubectl get nodes
kubectl get pods -A

Before production use, design high availability, load balancing, etcd backup, certificate renewal, upgrades, network policy, ingress, storage, monitoring, and firewall rules. A single-control-plane quick start is not a resilient cluster.

Page views: --

Total views -- · Visitors --