
This post is about building a Kubernetes cluster with one master node and three worker nodes.
Kubernetes first needs a container runtime and Kubernetes itself installed, so please go to the links below and install those.
Containerd : https://librat.kr/entry/Kubernetes-Containerd-설치하기-k8s-container-runtime
kubernetes : https://librat.kr/entry/Kubernetes-쿠버네티스k8s-1253-설치하기
Installing containerd as a Kubernetes runtime
If you use a command like the following, the cluster is created and a command is printed.
kubeadm init --apiserver-advertise-address 마스터노드ip --pod-network-cidr=10.244.0.0/16
If you copy the command at the bottom and paste it on a worker node, the node joins

Then run the following commands on the master node
mkdir -p $HOME/.kube
cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
chown $(id -u):$(id -g) $HOME/.kube/config
export KUBECONFIG=/etc/kubernetes/admin.conf
source <(kubectl completion bash)
echo "source <(kubectl completion bash)" >> ~/.bashrcThose commands grant Kubernetes access (kubeconfig).
Commands to check the nodes
kubectl get nodes
kubectl get nodes -o wide
Print the join command again
kubeadm token create --print-join-command
Comments 0
A nickname and a password are required. The same password edits or deletes the comment later. Comments appear after a review.