DevOps Classroomnotes 29/Jun/2022

Kubernetes Architecture

What is Kubernetes?

  • Kubernetes is a portable, extensible, opensource platform for managing containerized workloads and services

Architecture:

  • Components of kubernetes (k8s) cluster
    Preview
  • Control Plane Components
    • The control plane components make decissions about the cluster
    • Control plane can be run on any machine in the cluster
    • We can create a highly available cluster by using multiple machines for control plane components
    • The components are:
      • kube-apiserver
      • etcd
      • kube-scheduler
      • kube-controller-manager
      • kube-cloud-controller-manager
  • Node Components:
  • Thy run on every node, maintianing running pods and providing k8s runtime environment.
  • Our applications will be running on nodes
  • The Node Components are

    • kubelet
    • kube-proxy
    • Container runtime
  • kube-apiserver:

    • The API server is a component of k8s control plane that exposes k8s API (Front-end of k8s)
    • All the communication between control plane and nodes is also handled by api server
    • To make k8s HA (highly Available), we can horizontal scale api-server
    • As a user of k8s cluster we can interact with kube-api server using API with json or a tool called a kubectl which is a command line tool
  • etcd: Refer Here
    • This is distribute key-value store.
    • k8s uses etc to store all the cluster data
  • kube-scheduler:
    • Control plane component that creates Pods on the nodes by selecting them
  • kube-controller-manager:
    • Control plane component runs controller proceses. Each controller is a seperate process, but to reduce complexity they run in single process
    • Some major types of controller are
      • Node Controller: Responsible for noticing and responding when node goes down
      • Job Controller
      • Endpoints controller
  • Cloud-controller-manager:
    • This component embeds cloud-specific logic
  • Kubelet:
    • This is an agent that runs on each node in the cluster.
    • Kubelet recieves requests/orders to create new Pods
  • kube-proxy:
    • This is a network proxy that runs on each node in k8s
    • This maintains network rules on the nodes
  • Container runtime:

    • Kubernetes suppors container run times such as containerd, CRI-O and any implementation of Kubernetes CRI (Container Runtime instance)
  • Basic Workflow
    Preview
  • Note: JSON and YAML Tutorial Refer Here

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner