This commit is contained in:
2024-02-16 10:56:40 +01:00
parent 3c52d89e05
commit 3b038318e7
+19 -15
View File
@@ -1,15 +1,19 @@
# Install instructions for a 3-Node Kubernetes Cluster
## Prerequisites
Minimal Installed Debian 12/11, 2 CPU / vCPU, 2 GB RAM, 20 GB free disk space, Sudo User with Admin rights, Stable Internet Connectivity
Minimal Installed Debian 12/11 \
2 CPU / vCPU, 2 GB RAM \
20 GB free disk space \
Sudo User with Admin rights \
Stable Internet Connectivity
Ensure that each node can communicate with the others via a reliable network connection.
## Lab Setup
For the demonstration, I am using three Debian 12 systems.
Master Node (vmcon-master.his.de) 192.168.202.10
Worker Node 1 (vmcon-node1.his.de) 192.168.202.11
Master Node (vmcon-master.his.de) 192.168.202.10 \
Worker Node 1 (vmcon-node1.his.de) 192.168.202.11 \
Worker Node 2 (vmcon-node2.his.de) 192.168.202.12
@@ -24,32 +28,32 @@ $ hostnamectl set-hostname "vmcon-node2.his.de" // Run on 2nd worker node
Also add the following entries in /etc/hosts file on all the nodes,
192.168.202.10 vmcon-master.his.de vmcon-master.his.de
192.168.202.11 vmcon-node1.his.de vmcon-node1
192.168.202.10 vmcon-master.his.de vmcon-master.his.de \
192.168.202.11 vmcon-node1.his.de vmcon-node1 \
192.168.202.12 vmcon-node2.his.de vmcon-node2
## Disable Swap on All Nodes
For kubelet to work smoothly, it is recommended to disable swap. Run following commands on master and worker nodes to turn off swap.
$ swapoff -a
>$ swapoff -a \
$ sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab
## Add Firewall Rules for Kubernetes Cluster
In case, OS firewall is enabled on your Debian systems then allow following ports on master and worker nodes respectively.
On Master node, run
$ ufw allow 6443/tcp
$ ufw allow 2379/tcp
$ ufw allow 2380/tcp
$ ufw allow 10250/tcp
$ ufw allow 10251/tcp
$ ufw allow 10252/tcp
$ ufw allow 10255/tcp
>$ ufw allow 6443/tcp \
$ ufw allow 2379/tcp \
$ ufw allow 2380/tcp \
$ ufw allow 10250/tcp \
$ ufw allow 10251/tcp \
$ ufw allow 10252/tcp \
$ ufw allow 10255/tcp \
$ ufw reload
On Worker Nodes,
$ ufw allow 10250/tcp
$ ufw allow 30000:32767/tcp
>$ ufw allow 10250/tcp \
$ ufw allow 30000:32767/tcp \
$ ufw reload
Note: If firewall is disabled on your Debian 12/11 systems, then you can skip this step.