Kubernetes Master – components and working

In a Kubernetes cluster, we package our application and give it to the “Master”.
Master will distribute it to the nodes (minions) which do the actual work.

In the Master (representation above), there is a Control plane which has 4 components:

  1. API Server
    Acts as the entry point to the control plane.
    It exposes a REST API which consumes JSON files that has the application definition and state defined.
    Master checks the JSON file and pass the task onto one of the nodes in the cluster.
  2. Cluster store
    Stores the configuration and state of the cluster.
    Uses etcd (key value store) for storage
    Acts as a source of truth to the cluster
  3. Controller Manager
    It controls the multiple controllers that are in the cluster – like Node controller, Namespace controller…
    Continuously watches the state of the system and updates the API server
    It ensures that current state of the cluster is equal to the desired state of the cluster
  4. Scheduler
    Continuously watches out for pods that are unassigned and schedules them to different nodes in the cluster.
    Assigns work to these nodes.