DevOps Classroom Series – 12/Nov/2020

K8s master and Node Components

K8s master components

  • kube-apiserver:
  • etcd
  • kube-scheduler
  • Controller Manager
  • Cloud-Controller-Manager

k8s node components

  • kubelet
  • Container run-time
  • Kube-proxy

Pods

  • A pod is unit of work in k8s.
  • Each pod contains one or more containers.
  • Every pod gets unique ip address and the containers in the pod have same ip address.

K8s Installations

  • K8s has many ways of installations.
  • Installing k8s with deployment tools Refer Here
  • Turnkey k8s Solutions Refer Here
  • kubernetes for local laptop/single workstation Refer Here. Use this only for dev environmets

Kubeadm installation

  • Refer Here for devops blog installation steps
  • Refer Here for official documentation
  • Install docker and kubeadmin,kubectl on all the three servers as mentioned in above documentation. Now login into master and execute as Refereed Over Here
kubeadm init
  • Make node kubeadm init commands login as normal user and create .kube folder and config
Your Kubernetes control-plane has initialized successfully!

To start using your cluster, you need to run the following as a regular user:

  mkdir -p $HOME/.kube
  sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  sudo chown $(id -u):$(id -g) $HOME/.kube/config

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
  https://kubernetes.io/docs/concepts/cluster-administration/addons/

Then you can join any number of worker nodes by running the following on each as root:

kubeadm join 172.31.20.190:6443 --token pvx7ty.3vwwzeads1sjd5v3 \
    --discovery-token-ca-cert-hash sha256:b3d18743efe7230368b7ad3404bfa4e534bed0467cf79391d676f9f1082aa485
  • Now Apply pod network
 kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"
  • Now join two nodes to cluster by executing kubeadm join command shown above
  • After joining nodes, login into master and execute kubectl get nodes Preview

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin