Multi Node Kubernetes Cluster
Srishti Jain
DevOps Engineer || Azure 1x || CI/CD || AKS || Jenkins || Kubernetes || Git
Here we are creating multi node kubernetes cluster by using one master and two slaves.
Step1:- Install rhel 8 in your virtual box and make the local repo of your machine.
Step2:- Install Docker and k8s and make the repo of them, then install them.
Step3:- Now , to run the k8s smoothly disable the firewall,selinux and change the cgroup driver from "cgroupfs" to "systemd" which is compatible with k8s
Step4: - In order to make multi node cluster work smoothly we need to disable the swapping.
after this install iproute-tc and check whether the iptables is set to 1 or not.
Step5: -Now we have successfully configured the one machine. To avoid same configuration to be done in another two machines we are cloning this machine to create two more machines
Step6:- now open all the three machines and set the hostname in three of them and check whether they are connected or not by pinging to each other .
also make the entry in the file /etc/hosts
Step7:- Now to configure master we need to initialize kubeadm in master node. Doing this will provide us a token which will be further used to add slaves to master.
Step8: -Now to create a client to communicate to master, we need to provide a config file having client certificate and other important credential and also we need to copy our config file to root and can transfer it to client using WINscp, Apart from this you can directly transfer the file from .kube to client using Winscp without coping it to /root/.
Step9: - Go to client's cmd which is windows in our case, and go to the directory we copied the config file and now you can run your normal kubectl programs to create the docker container.
and finally run the IP of slave on your browser and you'll see the results
Student at Bundelkhand University
4 年Congrats????
AWS || AZURE || PYTHON || BIG DATA || TERRAFORM || KUBERNETES || SHELL SCRIPTING || POWERSHELL || LINUX
4 年Great work
Software Developer | Full-Stack | .Net Core | Angular | Azure | SQL | Agile | 2x Azure Certified
4 年Great ??
Cloud Architect ? 6X Azure ? 1X Databricks ? ACE Certified ? MCT
4 年Good Work
AVi
4 年Nyx