Skip to content

k21academyuk/K8s_Installation_Script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 

Repository files navigation

Kubernetes Installation Instructions

1. Clone the Repository

sudo -i
git clone https://github.com/k21academyuk/K8s_Installation_Script.git
cd K8s_Installation_Script

2. Make cluster.sh Executable

chmod 777 cluster.sh

3. Run the Script

sh cluster.sh

Once you run the script in all nodes, execute the following commands:

4. Initializing the Control-Plane Node

Run the following command on the master node:

cd ~ 
kubeadm init 

Note: Copy the kubeadm join command & paste it on worker nodes.

5. Set Environment Variable on the Master Node

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

6. Install CNI

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

7. Node Status

Verify the staus of master & worker nodes(master node):

kubectl get nodes

8. Verify System Pods

Verify the kube-system pods(coreDNS, ETCD, kubelet, etc ..)(master node):

kubectl get pods -n kube-system

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages