Kubernetes : Install Kubeadm2026/05/12 |
|
Configure Multi Nodes Kubernetes Cluster. This example is based on the environment like follows.
For System requirements, each Node has unique Hostname, MAC address, Product_uuid.
+----------------------+ +----------------------+
| [ ctrl.srv.world ] | | [ dlp.srv.world ] |
| Manager Node | | Control Plane |
+-----------+----------+ +-----------+----------+
eth0|10.0.0.25 eth0|10.0.0.30
| |
------------+--------------------------+-----------
| |
eth0|10.0.0.51 eth0|10.0.0.52
+-----------+----------+ +-----------+----------+
| [ node01.srv.world ] | | [ node02.srv.world ] |
| Worker Node#1 | | Worker Node#2 |
+----------------------+ +----------------------+
|
| [1] | On all Kubernetes Cluster Nodes except Manager Node, Change settings for System requirements. |
|
root@dlp:~#
root@dlp:~# apt -y install containerd curl gpg mkdir /etc/containerd root@dlp:~# containerd config default | tee /etc/containerd/config.toml
root@dlp:~#
vi /etc/containerd/config.toml # line 51 : change sandbox = 'registry.k8s.io/pause:3.10.1' # line 109 : change SystemdCgroup = true
root@dlp:~#
systemctl restart containerd.service
root@dlp:~#
cat > /etc/sysctl.d/99-k8s-cri.conf <<EOF
net.bridge.bridge-nf-call-iptables=1 net.bridge.bridge-nf-call-ip6tables=1 net.ipv4.ip_forward=1 EOF
root@dlp:~#
sysctl --system
# disable ufw and swap root@dlp:~# ufw disable root@dlp:~# swapoff -a
root@dlp:~#
vi /etc/fstab # comment out #/swap.img none swap sw 0 0 |
| [2] | On all Kubernetes Cluster Nodes except Manager Node, Install required packages. |
|
root@dlp:~#
root@dlp:~# curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.36/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg root@dlp:~# echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.36/deb/ /" | tee /etc/apt/sources.list.d/kubernetes.list
ln -s /opt/cni/bin /usr/lib/cni
|
| Sponsored Link |
|
|