We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

The Control Plane

Okay, so kubectl lets you run commands against Kubernetes clusters. But it's just a client that communicates with a Kubernetes API server. Broadly speaking, there are two types of machines in a Kubernetes cluster:

  • Control Plane

  • Worker Nodes

The control plane manages the cluster itself. It's where the API server, scheduler, and controller manager live. Worker nodes are the machines that actually run your containers.

Control Plane Components

  • API server (kube-apiserver): The API that kubectl and every other component talk to.

  • etcd: A key-value database that stores the state of the cluster.

  • Scheduler (kube-scheduler): Picks a node for each new pod.

  • Controller manager (kube-controller-manager): Watches the cluster and makes changes to get it closer to the state you asked for.

Node Components

  • kubelet: An agent that starts and stops the containers on its node.

  • kube-proxy: Sets up the networking rules that route traffic to pods.

  • A container runtime, like containerd: The thing that actually runs the containers.

Scaling

Let's break down what actually happens within the cluster when you run:

kubectl scale deployment synergychat-web --replicas=20
  1. kubectl sends the request from your machine to the API server.

  2. The API server saves "20 replicas" to etcd.

  3. A controller notices that 1 pod exists but 20 are wanted, so it creates 19 more.

  4. The scheduler assigns each new pod to a node.

  5. The kubelet on that node starts the containers.

Assignment

kubectl get pods -n kube-system

Submit the shell checks.

This (mock) cluster has a single node that runs both the control plane and your apps. Production clusters usually keep the control plane on its own machine(s).