Kubernetes Cluster AdministrationcontainerdkubeadmUbuntu Server

Article & Tutorial

Kubernetes Cluster Setup with kubeadm on Ubuntu

Build a Kubernetes cluster on Ubuntu with kubeadm and containerd, from host preparation and control-plane initialization to networking, worker joins, validation, and recovery.

Kubernetes cluster architecture with control plane and worker nodes
Kubernetes cluster architecture with control plane and worker nodes
Contents

A reliable kubeadm deployment starts with consistent operating-system settings, a supported container runtime, working name resolution, and a deliberate network plan. The steps below use Ubuntu, containerd, and a standard Container Network Interface (CNI) plugin.

Plan the cluster before installation

  • Assign stable hostnames and addresses to every node.
  • Confirm that required ports are permitted between control-plane and worker nodes.
  • Choose a pod CIDR that does not overlap node, VPN, or datacenter networks.
  • Use synchronized time and working DNS on every host.
  • Keep the Kubernetes minor version aligned across kubeadm, kubelet, and kubectl.

Prepare every Ubuntu node

Update the operating system, disable swap unless your Kubernetes design explicitly supports it, load the overlay and br_netfilter kernel modules, and enable IPv4 forwarding. Reboot if a kernel update requires it, then verify that each node can resolve and reach the others.

Install and configure containerd

Install containerd from a trusted repository, generate its default configuration, and set SystemdCgroup to true so the runtime and kubelet use the same cgroup driver. Restart and enable the service, then confirm it is active before installing Kubernetes packages.

Install kubeadm, kubelet, and kubectl

Use the current Kubernetes package repository for the minor release you intend to operate. Install kubelet, kubeadm, and kubectl, then hold the packages so routine system upgrades do not create an unsupported version skew. Plan cluster upgrades as controlled maintenance.

Initialize the control plane

Run kubeadm init on the first control-plane node with the selected pod network CIDR and, for highly available designs, a stable control-plane endpoint. When initialization completes, copy the generated admin kubeconfig to the administrator account and save the worker join command securely.

Install pod networking and join workers

Apply one CNI implementation whose configuration matches the chosen pod CIDR. Wait for the networking pods to become ready, then run the kubeadm join command on each worker. Generate a fresh token with kubeadm token create --print-join-command if the original token expires.

Validate the cluster

  • Check node readiness and confirm every expected node is present.
  • Inspect pods in all namespaces; core DNS and network components should be healthy.
  • Create a small deployment and expose it inside the cluster.
  • Scale the deployment and verify that pods are scheduled across workers.
  • Test DNS resolution and pod-to-pod connectivity before adding production workloads.

Common failure patterns

SymptomLikely causeFirst check
Node remains NotReadyCNI missing or unhealthyInspect networking pods and kubelet events
kubeadm preflight failureSwap, ports, or stale stateRead the exact preflight result before resetting
Pods cannot resolve namesCoreDNS or CNI problemCheck CoreDNS logs and service routing
Worker cannot joinToken, discovery hash, firewall, or time skewRegenerate the join command and test API reachability

Production readiness

For production, use multiple control-plane nodes, protect etcd backups, define upgrade and certificate-renewal procedures, enforce network policies, restrict administrative credentials, centralize logs and metrics, and test restoration. kubeadm builds the cluster; operational resilience still depends on the surrounding design.

Official kubeadm cluster creation documentation

Did this help?

Yes No

Join the discussion

0 Comments

Ask questions, add context, or share what worked.

Sign in to join the discussion

No comments yet. Start the discussion.

More from Melochip Editorial

Related articles

Stay in the loop. Get new Melochip articles

Receive Melochip article updates when new articles are available. Explicit opt-in only.

No pre-checked boxes. Unsubscribe support is part of the subscriber foundation.