Date

K8s: Bootstrapping a Cluster with Kubeadm

Summary

In this article we will learn about the process involved in Creating k8s Cluster and adding Linux/Windows Node

Prerequisite

Linux Physical or virtual machine for Master and Linux/Windows physical or virtual machine as Nodes (Minions)

Bootstrapping a Cluster with kubeadm

Step by Step process:

  1. Run Kubadm init, initialize Kubernetes Cluster
  1. First phase is pre-flight checks

    a. Required permissions on the System

    b. Pull Container Images for Control plane (runs as PODs)

    c. Validate required System Resource (CPU and Memory)

    d. Checks for compatible Container Runtime and is it running (Startup Type: Automatic)

  1. Creates a Certificate Authority for authentication and encryption
  1. Creates kubeconfig files for authenticating various components of Kubernetes against API server
  1. Create Static Pod Manifests for Control Plane Pods
  1. Kubeadm starts Control plane (i.e API server, Schedular, Etcd and Control Manager) as Pods
  1. Kubeadm then taints the Master (User Pods will not run on Master), only System Pods will run on Master
  1. Kubeadm generates Bootstrap token for joining additional Nodes to the Cluster
  1. Kubeadm then starts Add-on Pods (DNS/Kube-proxy)

Adding Node to the Cluster 

Step by Step process:

  1. Run Kubeadm join and pass ‘Join Token’ with CA Cert hash
  1. Node will download Cluster Information
  1. Node submits CSR request into the API Server to generate a certificate to be used the Kubelet
  1. CA will automatically sign that CSR, and the Kubeadm is going to download that Certificate and store that on the files system on the Node
  1. That certificate is going to live in the /var/lib/kubelet.pki
  1. Kubeadm is then going to generate kubelet.conf file that  consist of a pointer to Client Certificate and also the location of API server designated to authenticate this Node. This process is called TLS Bootstrapping

AZmachina

Knowledge Shared = Knowledge2

We have created AZmachina blog to share our knowledge on Docker & Container and Kubernetes on Windows Servers with curious and enthusiastic novice learner. We hope that this will help them to take a swim in this vast ocean of Window Containers and Kubernetes

Happy Learning !
Recent Posts
Categories
Archives
Sumeet Kumar

Sumeet Kumar

I am Windows Core Engineer with 7+ years of experience in Windows Hyper-v, Failover Cluster, Windows Storage, Volume Shadow Copy (VSS), Docker & Containers on Windows Servers, Backup & Recovery, VMware vSphere EXSi & vCenter Server

RELATED

Articles

Leave a Reply

Your email address will not be published. Required fields are marked *