# Anatomy of `kubectl apply` - Inside the Kubernetes Control Plane Page: https://stenobird.com/podcast/software-engineer-interview-prep-podcast-7756520/anatomy-of-kubectl-apply-inside-the-kubernetes-control-plane Text version: https://stenobird.com/podcast/software-engineer-interview-prep-podcast-7756520/anatomy-of-kubectl-apply-inside-the-kubernetes-control-plane.md Podcast: [Software Engineer Interview Prep Podcast](https://stenobird.com/podcast/software-engineer-interview-prep-podcast-7756520) Published: 2026-04-24T20:58:21+00:00 Episode link: https://podcasters.spotify.com/pod/show/prabuddha-ganegoda/episodes/Anatomy-of-kubectl-apply---Inside-the-Kubernetes-Control-Plane-e3iee6g Audio file: https://anchor.fm/s/10f2c0f8c/podcast/play/119010960/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2026-3-24%2F422823624-44100-2-80dd0a975e308.mp3 Processing state: not_requested JSON: https://stenobird.com/v1/public/podcasts/software-engineer-interview-prep-podcast-7756520/episodes/anatomy-of-kubectl-apply-inside-the-kubernetes-control-plane Duration seconds: 468 ## Resource When I run kubectl apply, the request is sent to the Kubernetes API Server , which acts as the entry point to the cluster. The API Server processes the request through several stages: Authentication – validates the client (certificates, tokens, etc.) Authorization – checks permissions using RBAC Admission Controllers Mutating (e.g., inject defaults, sidecars) Validating (ensure request is compliant) Once validated, the object is persisted. The API Server stores the Deployment object in etcd , which is the cluster’s consistent key-value store. At this point, the desired state is recorded—but nothing is running yet. The Kubernetes Controller Manager detects the new Deployment via the API Server’s watch mechanism. Deployment Controller creates a ReplicaSet ReplicaSet Controller creates the required Pods This is all driven by control loops comparing: Desired state (in etcd) Current state (actual cluster) The Pods are created without a node assigned. The kube-scheduler : Filters nodes (resource constraints, taints, node selectors) Scores remaining nodes (resource availability, affinity rules) Assigns the best node Once scheduled, the kubelet on the node pulls the image and starts the container. "The important thing is Kubernetes is entirely declarative and event-driven . Nothing is executed immediately—instead, components continuously reconcile actual state toward desired state." ## Actions - request_transcript: `POST https://stenobird.com/v1/public/podcasts/software-engineer-interview-prep-podcast-7756520/episodes/anatomy-of-kubectl-apply-inside-the-kubernetes-control-plane/transcription-requests` — Idempotently request low-priority transcript generation for this episode. - read_markdown: `GET https://stenobird.com/podcast/software-engineer-interview-prep-podcast-7756520/anatomy-of-kubectl-apply-inside-the-kubernetes-control-plane.md` — Read the agent-friendly Markdown representation of this episode resource. A page view does not enqueue transcription. Agents should invoke `request_transcript` explicitly when they need this episode processed. ## Transcript Full transcripts are not published on public pages unless there is a clear rights basis.