<< PREVIOUS

 

 

INSTALLATION

  1. Execute the commands below to install the required kubernetes software in all the three machines

    1. sudo su

       

       

    2. sudo apt-get update

       

       

    3. sudo apt-get install -y apt-transport-https ca-certificates curl

       

       

    4. sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg

       

       

       

       

    5. echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list

       

       

       

       

    6. sudo apt-get install -y kubelet=<Kubernetes_Version> kubeadm=<Kubernetes_Version> kubectl=<Kubernetes_Version>

       

       

       

      1. Example: sudo apt-get install -y kubelet=1.19.0-00 kubeadm=1.19.0-00 kubectl=1.19.0-00

    7. apt update

       

       

    8. apt install docker.io -y

       

       

  2. Execute the commands below to provision Kubernetes Control plane on the master machine

    1. sudo kubeadm init --pod-network-cidr=<CIDR_Range_for_IPAddress>

       

       

      1. Example: sudo kubeadm init --pod-network-cidr=10.244.0.0/16

    2. mkdir -p $HOME/.kube

       

       

    3. sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config

       

       

    4. sudo chown $(id -u):$(id -g) $HOME/.kube/config

       

       

    5.  

       

       

       

  3. Execute the command below to list the nodes

    1. kubectl get nodes

       

       

      Picture 1073741824

  4. Execute the command below to generate a join command to execute on the worker nodes

    1. kubeadm token create –print-join-command

       

       

      Picture 7

  5. On the Worker machines, execute the join command so that the machines join as workers in the Kubernetes cluster

    1. Example: kubeadm join 172.31.2.84:6443 --token fh9lqg.4ko0gz16owx1r8i6 --discovery-token-ca-cert-hash sha256:02fba06cea1124f3639e6aebbcf4f01464bd9dc22512fe50e208be8ed4d56582

      Text
Description automatically generated

      Text
Description automatically generated

  6. On the master machine, execute the command below to list the nodes

    1. kubectl get nodes

       

       

      Shape
Description automatically generated with medium confidence

  7. The Kubernetes cluster is up and running for workload deployment

 

<< PREVIOUS