Appearance

Inside a Kubernetes cluster

Follow a Pod from the Kubernetes API to the machine where its container runs.

What you will understand

  • Identify the parts of the control plane that accept, store, and act on requests.
  • Trace who chooses a node and who starts a container.
  • Use component boundaries to narrow down a failure.

Builds on: Networking before Kubernetes

Who does what in a Kubernetes cluster

Suppose you have three machines and want to run a web server. You could log into one and launch it by hand. With Kubernetes, you submit a description of what should run. Kubernetes needs a place to accept that request, somewhere to save it, a decision about which machine will run it, and a way to do the work on that machine.

A cluster is the group of machines and Kubernetes components working together. A node is a machine registered with the cluster, physical or virtual. The control plane manages cluster-level decisions. Its API server is the front door. kubectl sends requests there. The server checks the request and uses etcd, a distributed key-value store, to store the cluster’s API state. Your terminal and the application containers do not have to connect directly to etcd.

A controller watches for relevant state and takes action to bring the cluster toward the target. A Deployment controller manages ReplicaSets, and a ReplicaSet controller makes Pods to maintain the requested count. The scheduler watches for Pods that still need a node, checks candidate machines against their requirements, and records a placement. Each component solves a part of the problem using the API.

Who owns the cluster’s shared state?

Clients and cluster components communicate through the API server. The API server persists Kubernetes objects in etcd.

  1. kubectlSubmit a write
    API serverThe server checks the identity and the requested operation.
  2. API serverPersist the accepted object
    etcdThe requested state is stored.
  3. API serverExpose the saved object
    ControllersControllers can observe the new state through reads or watches.
Follow the sequence

Clients and cluster components communicate through the API server. The API server persists Kubernetes objects in etcd.

One logical API server and one logical etcd store represent potentially replicated services.

Find the components in your lab cluster

Once the Pod is assigned, the kubelet on that node handles the local steps. A kubelet is the agent that keeps the containers for assigned Pods running according to their specs and reports their status. It talks to a container runtime, such as containerd, through the Container Runtime Interface (CRI). The interface is the agreed way to request work like setting up a Pod sandbox or starting a container.

Which component gets a Pod running?

A controller creates the Pod object, the scheduler selects a node, and the kubelet on that node starts its containers.

  1. ReplicaSet controllerCreate a Pod object
    API serverA new Pod exists with an image reference and no assignment.
  2. SchedulerRecord the binding
    API serverThe Pod has a chosen worker.
  3. Worker kubeletAsk the runtime to start it
    Container runtimeThe node prepares the Pod and starts the process.
Follow the sequence

A controller creates the Pod object, the scheduler selects a node, and the kubelet on that node starts its containers.

One ordinary controller-owned Pod is shown; static Pods and direct nodeName overrides are excluded.

Explore another case

Try the read-only commands on a practice cluster. get nodes tells you which nodes are registered and reporting health. get pods -n kube-system shows system Pods the cluster exposes there. Some managed services run control-plane components outside the namespaces you can see. The API inventory answers which kinds of API resources your server currently offers.

# Read-only inventory; component visibility varies by distribution.
kubectl get nodes -o wide
kubectl get pods -n kube-system
kubectl cluster-info
# Ask the API which resources it serves rather than guessing.
kubectl api-resources

The short Pod definition below requests one nginx container. If you submit it in a practice namespace, the API stores the Pod spec, the scheduler assigns the node, and the node’s kubelet and runtime start the container. This example creates a Pod directly. With a Deployment, the controllers create the Pod object first and the same node-startup steps follow.

apiVersion: v1
kind: Pod
metadata:
  name: component-demo
spec:
  containers:
    - name: web
      image: nginx:1.27.5

Predict what still works if a component fails

Use the component boundaries to reason about failures. If your client cannot connect to the API server, existing containers can keep running for a time, depending on what they need from the API. New writes and scheduling decisions can stall. If the API accepts the Pod but its image cannot be pulled, start at the node and registry boundary. Find the Pod’s assigned node and read the event to learn what the kubelet was attempting. In the module lab, you can see a controller respond when one of its Pods disappears.

Check where your provider runs the control plane

Control-plane availability and application health answer different questions. A healthy API can report an unhealthy workload. A running container can keep answering requests during a control-plane interruption. Check the actual evidence at each boundary before restarting anything.

Check your understanding

A Pod has a node name but the image is still downloading. Which component do you investigate first?

Look at the assigned node’s kubelet and runtime, using the Pod events as a starting point. The node name shows scheduling already made a placement. The next work is to obtain the image, prepare the container, and start it.

Primary documentation

Go to the source

Reviewed 2026-10-27 · Kubernetes 1.37 · Related local exercise

Search the book

Search loads when you open it.

Keyboard shortcuts

Ctrl + K / ⌘ + K
Search the book
?
Open this guide
Tab / Shift + Tab
Move between controls
Enter / Space
Activate a focused button or disclosure
← / →
Focused visual timeline · previous or next step
Home / End
Focused visual timeline · first or last point
Esc
Close the open dialog or menu