🤖

Understanding Kubernetes Architecture in Depth

May 22, 2025

Lecture Notes: Kubernetes Architecture

Introduction

  • New chapter: Understanding Kubernetes from scratch, focusing on architecture and its role in DevOps.
  • Kubernetes developed by Google.
  • Emphasis on understanding architecture to grasp Kubernetes' orchestration capabilities.

Kubernetes Architecture Overview

  • Control Plane ("Brain" of Kubernetes):
    • Central control component in Kubernetes.
  • Worker Nodes:
    • Execution environment where applications run.
  • Example: A single node cluster (Minikube), can be expanded to multi-node cluster.

Key Components of Control Plane

  1. Kube-API Server

    • Front end of Kubernetes brain.
    • Manages communications and scheduling with nodes.
    • Interfaces with other components: Controller Manager, etcd, Scheduler.
  2. etcd

    • Backend database storing data as key-value pairs.
  3. Scheduler

    • Assigns newly created pods to nodes.
    • Ensures pods are scheduled on appropriate nodes.
  4. Controller Manager

    • Distributes load away from Kube-API Server.
    • Contains several controllers:
      • Node Controller: Detects node failures, manages node status.
      • Job Controller: Manages cron jobs and tasks.
      • Endpoint Controller: Links services and pods.
      • Service Account Controller: Manages default service accounts.
  5. Cloud Controller Manager (CCM)

    • Interfaces with cloud services, not available in Minikube.

Node Components

  1. Kubelet

    • Agent running on each worker node.
    • Ensures pod specifications are met.
    • Manages container execution.
  2. Kube-Proxy

    • Network component facilitating communication within pods and namespaces.
    • Interacts with API Server for network requests.

Container Runtime

  • ContainerD:
    • Software running inside each container.
    • Manages operations in the latest Kubernetes version (1.27).

Summary

  • Two main component types: Control Plane (Brain) and Worker Nodes.
  • Control Plane has five components; Worker Nodes have two.
  • All components function on Container Runtime.

Next Steps

  • Future sessions will explore pods, deployments, and stateful sets.
  • Complete documentation available in the linked repository.

Conclusion

  • Lectures will continue to cover practical aspects of Kubernetes.
  • Engagement encouraged through comments and feedback.