Module 3: Kubernetes Architecture (Master & Worker Nodes)

DevOpsLaunchpadDevOpsLaunchpad
2 min read

Kubernetes follows a master–worker architecture. The master (control plane) makes decisions about the cluster, while workers run the actual workloads (containers inside pods). Understanding this architecture is crucial before deploying applications.

    1. High-Level Architecture

At a high level:

  • Developers/Users interact with Kubernetes using kubectl or APIs.

  • The Control Plane (Master Node) manages cluster state and schedules pods.

  • Worker Nodes run the actual containers using a container runtime (Docker, containerd).

    1. Control Plane Components (Master Node)
  • kube-apiserver

    • Acts as the front door of Kubernetes.

    • All commands (kubectl, dashboards, CI/CD tools) go through the API server.

  • etcd

    • Distributed key-value store.

    • Stores cluster state (which pods are running, node availability, configs).

  • kube-scheduler

    • Assigns new pods to the best worker node based on resources, affinity rules, taints/tolerations.
  • kube-controller-manager

    • Runs controllers that watch the cluster. Examples:

      • Node Controller – Manages node availability.

      • Replication Controller – Ensures the desired number of pods are running.

      • Endpoint Controller – Manages service endpoints.

  • cloud-controller-manager

    • Integrates with cloud providers (AWS, GCP, Azure) to handle load balancers, storage, etc.
      1. Worker Node Components

      2. kubelet

        • Agent running on each worker node.

        • Ensures pods assigned to it are running as expected.

        • Reports node/pod status back to the API server.

      3. kube-proxy

        • Handles networking on each worker node.

        • Ensures communication between services and pods.

      4. Container Runtime (Docker/containerd/CRI-O)

        • Pulls container images and runs them.
      1. How It All Works Together

      2. User runs:

          kubectl apply -f pod.yaml
        
      3. API server validates and stores config in etcd.

      4. Scheduler finds the best worker node.

      5. kubelet on that worker pulls the image and runs the pod.

      6. kube-proxy enables networking, so services can reach the pod.

  • Kubernetes Architecture Diagram

    Here’s a Master & Worker Node Architecture diagram:

    • Summary:

    • Control Plane = Manages cluster (API server, etcd, scheduler, controllers).

    • Worker Nodes = Run workloads (kubelet, kube-proxy, container runtime).

    • Communication = User → API Server → Scheduler → Worker → Pods.

0
Subscribe to my newsletter

Read articles from DevOpsLaunchpad directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

DevOpsLaunchpad
DevOpsLaunchpad