sudo -i
git clone https://github.com/k21academyuk/K8s_Installation_Script.git
cd K8s_Installation_Script
chmod 777 cluster.sh
sh cluster.sh
Once you run the script in all nodes, execute the following commands:
Run the following command on the master node:
cd ~
kubeadm init
Note: Copy the kubeadm join command & paste it on worker nodes.
To start using the cluster, set the environment variable on the master node:
export KUBECONFIG=/etc/kubernetes/admin.conf echo 'export KUBECONFIG=/etc/kubernetes/admin.conf' >> .bashrc
Install Container Network Interface (CNI) so that pods can communicate across nodes and also Cluster DNS to start functioning. Apply Weavnet CNI on the master node:
kubectl apply -f https://github.com/weaveworks/weave/releases/download/v2.8.1/weave-daemonset-k8s.yaml
Verify the staus of master & worker nodes(master node):
kubectl get nodes
Verify the kube-system pods(coreDNS, ETCD, kubelet, etc ..)(master node):
kubectl get pods -n kube-system