# sudo kubeadm init -pod-network-cidr=192.168.0.0/16 #Do this only if proper CPU cores are available sudo kubeadm init -pod-network-cidr=192.168.0.0/16 -ignore-preflight. On the master node initialize the cluster. Systemctl enable kubelet & systemctl start kubele Only on the Master Node:
#Install kubernetes cluster install
Install kubelet, kubeadm and kubectl start kubelet daemon yum install -y kubelet kubeadm kubectl -disableexcludes=kubernetes Kubernetes needs to have access to kernel’s IP6 table and so we need to do some more modifications. Sysctl command is used to modify kernel parameters at runtime. Systemctl enable docker & systemctl start dockerĬreate proper yum repo files so that we can use yum commands to install the components of Kubernetes.
Also, enable the docker service so that the docker service starts on system restarts. On both the master and worker nodes:īe a root user. Hope you are ready with all that is written in the prerequisites. There are a few commands that we need to run on the master as well as the worker node. Henceforward we will call them master and worker nodes. Decide which EC2 instance would be the master/manager and which would be worker/slave.