Great, our Kubernetes control plane has been initialized successfully, Make sure you copy the kubeadm join command and keep it handy as this will be required to bootstrap or join our worker nodes with the control plane. Lets initialize the kubernetes Control plane by running below command on the master node #kubeadm init Sudo firewall-cmd -reload Initializing Kubernetes Cluster Control plane Ports needs to be allowed on Kubernetes Master node #firewall-cmd -add-port=/udp -permanent #systemctl disable -now firewalld #disable firewalld We can disable firewalld on all the Kubernetes nodes or if you have an active firewalld, below firewalld rules needs to be enabled on Master and Worker nodes. #systemctl start docker Configure Firewalld
#yum install kubeadm docker -y #systemctl enable kubelet Once kubeadm and docker are installed, we need to enable both the services so that they can start automatically on reboot and start. We will be installing the most popular container engine platform that is docker in this tutorial. Since Kubernetes repository is now available for centos, we will configure yum to use the same. #setenforce 0 #vi /etc/sysconfig/selinuxįor Kubernetes to work smoothly, lets disable swap # swapoff -a Next we need to disable Selinux, this can be done temporarily by using below command or can be done permanently by disabling in the selinux configuration. # vi /etc/hostsĪll the servers should be able to ping each other. We need to add hostname entries to DNS server or we can use /etc/hosts for hostname to IP resolution.
All the servers should have networking configured and should be able to communicate with each other.Master node should have at least 2GB of ram so that it can run smoothly without glitches.
Since we are deploying 3 node cluster, we will need 3 servers with centos 7 installed on it.
Here will will deploy one master and two worker node setup. Kubernetes cluster can be deployed with one master and one worker node or multiple master and multiple worker nodes. Kubernetes is the most popular container Orchestration engine.
In this tutorial, we will explore how to install Kubernetes cluster from scratch.