Kubernetes: High-level Steps for Deploying Kubernetes with Kubeadm

Claire Lee
2 min readApr 14, 2023

The general procedures for deploying a Kubernetes cluster using Kubeadm.

High-level Steps for Deploying Kubernetes with Kubeadm

Assuming we have one master and one worker node, here are the high-level steps to deploy a Kubernetes cluster using Kubeadm.

  1. (master node, worker node) Install container runtime
    You can find instructions on how to do this in the official Kubernetes documentation.

2. (master node, worker node) Install Kubeadm, Kubelet, and Kubectl

You can find instructions on how to do this for your specific operating system in the official Kubernetes documentation.

Use below command to check the Linux distribution running on the current machine:

$ cat /etc/*-release

3. (master node) Initialize the control-plane node

$ kubeadm init <args>

This will download the necessary Kubernetes components and generate a kubeconfig file that you can use to authenticate to the cluster.

4. (master node) Configure kubectl
Follow the instructions output by the kubeadm init command.

mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

5. (worker node) Join the worker node to the cluster

$ kubeadm join --token <token> <control-plane-host>:<control-plane-port> --discovery-token-ca-cert-hash sha256:<hash>

Run kubeadm join command with the necessary parameters, such as the IP address of the master node and the token generated by the kubeadm init command.

6. (master node) Verify that the worker node has joined the cluster

$ kubectl get nodes

7. (master node) Install a Pod network add-on
Install Flannel, Calico, or Weave Net to enable communication between pods running on different nodes.

$ kubectl apply -f <add-on.yaml>

These are my personal notes for CKA exam preparation on Kubernetes. Please feel free to correct me if you notice any errors. 😊

--

--