How to install Kubernetes on Rocky Linux: Complete Setup Tutorial
In this video I show you how to install and configure a Kubernetes cluster for your home or business needs!
###### Configure firewal on master node ######
firewall-cmd –permanent –add-port={6443,2379,2380,10250,10251,10252,10257,10259,179}/tcp
firewall-cmd –permanent –add-port=4789/udp
firewall-cmd –reload
###### Configure firewal on worker node ######
firewall-cmd –permanent –add-port={179,10250,30000-32767}/tcp
firewall-cmd –permanent –add-port=4789/udp
firewall-cmd –reload
###### Add the overlay and br_netfilter kernel modules on all the nodes ######
vim /etc/modules-load.d/k8s.conf
overlay
br_netfilter
###### Add the following kernel parameters on all the nodes ######
vim /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-iptables = 1
net.ipv4.ip_forward = 1
net.bridge.bridge-nf-call-ip6tables = 1
sysctl –system
###### Install container runtime containerd on all the nodes ######
yum install -y yum-utils
yum-config-manager –add-repo https://download.docker.com/linux/centos/docker-ce.repo
dnf install containerd.io -y
###### Configure containerd ######
mv /etc/containerd/config.toml /etc/containerd/config.toml.bkp
containerd config default > /etc/containerd/config.toml
vim /etc/containerd/config.toml
SystemdCgroup = true
sudo systemctl restart containerd
sudo systemctl enable containerd
###### Configure kubernetes repo on all the nodes ######
vim /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://pkgs.k8s.io/core:/stable:/v1.28/rpm/
enabled=1
gpgcheck=1
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.28/rpm/repodata/repomd.xml.key
exclude=kubelet kubeadm kubectl cri-tools kubernetes-cni
###### Install kubernetes tools on all the nodes ######
yum install -y kubelet kubeadm kubectl –disableexcludes=kubernetes
###### Enable kublet service on all the nodes ######
systemctl enable kubelet
###### Create user kube & kubernetes configuration ######
useradd -G wheel kube
passwd kube
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
###### Install Calico ######
kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.3/manifests/calico.yaml
###### Label worker nodes ######
kubectl label node worker01 node-role.kubernetes.io/worker=worker
0:00 – Intro
0:42 – Swap, Hostname & SELinux configuration
3:18 – Master firewall configuration
3:42 – Master kernel modules configuraiton
4:48 – Master host file configuration
5:24 – Containerd installation & configuration
7:42 – Installing Kubernetes
9:29 – Initializing the Kubernetes cluster
10:29 – Kubernetes user & configuration
12:49 – Kubernete cluster status verification
13:19 – Worker nodes configuration
14:05 – Worker kernel modules, containerd & kubernetes
14:37 – Verifying all nodes have all tools installed
15:10 – Joining the worker nodes to the cluster
16:09 – Installing Calico network service
17:12 – Verify all pods and Calico installation
17:55 – Assigning roles to the worker nodes
18:40 – Deploying and nginx container
20:16 – Nginx container verification
#kubernetes #kubernetespods #kubernetestutorialforbeginners #kubernetesforbeginners #rockylinux #devops #devopstraining #cloudcomputing #cicd #docker #dockercontainer #containerization
––––––––––––––––––––––––––––––
Midnight Stroll by Ghostrifter bit.ly/ghostrifter-sc
Creative Commons — Attribution-NoDerivs 3.0 Unported — CC BY-ND 3.0
Free Download: hypeddit.com/track/2gic0s
––––––––––––––––––––––––––––––
centos 7
Amazing content, this is the way tutorials should be, thanks for sharing!!!
1St 🙂 😍😍