Atharva Unde
DWG NO.K8S-ANAT-01 · REV ASHEET01 / 26TITLEAssembled cluster
THE PARTS LIST

Resources (API objects)

Every object has the same five parts:

apiVersionGroup + version, e.g. apps/v1
kindDeployment, Service, …
metadataname, namespace, labels, annotations, ownerReferences, finalizers, resourceVersion
specDesired state. Written by you.
statusObserved state. Written by controllers.

Workloads

7
PodSmallest deployable unit: one or more containers sharing network, IPC, and volumes. Includes init containers, sidecar containers (restartable init containers), and ephemeral debug containers.
ReplicaSetKeeps N identical pods running via a label selector. Rarely used directly.
DeploymentManages ReplicaSets for stateless apps. Handles rolling updates (maxSurge, maxUnavailable), rollback, and revision history.
StatefulSetStable identity (web-0, web-1), ordered start/stop, a PVC per replica via volumeClaimTemplates, and a headless Service for stable DNS.
DaemonSetOne pod per (matching) node, for log agents, CNI, and node exporters.
JobRuns pods to completion, with completions, parallelism, and backoffLimit.
CronJobCreates Jobs on a cron schedule.

Networking

5
ServiceStable virtual IP and DNS name for a set of pods. Types: ClusterIP (internal), NodePort (port on every node), LoadBalancer (cloud LB), ExternalName (DNS CNAME), and Headless (clusterIP: None, returns pod IPs directly).
EndpointSliceThe actual list of backend pod IPs and ports for a Service, split into chunks for scale.
IngressL7 HTTP routing rules (host/path → Service), implemented by an ingress controller.
Gateway APISuccessor to Ingress (GatewayClass, Gateway, HTTPRoute, and others), with a more expressive, role-oriented design.
NetworkPolicyPod-level firewall rules for ingress and egress, enforced by the CNI.

Configuration

2
ConfigMapNon-secret configuration, consumed as env vars or mounted files.
SecretSensitive data, base64-encoded rather than encrypted by default. Enable encryption at rest with an EncryptionConfiguration or KMS, or use External Secrets or Secrets Store CSI.

Storage

5
PersistentVolumeA piece of actual storage (an EBS volume, NFS share, etc.). Cluster-scoped.
PersistentVolumeClaimA request for storage by a pod. Binds to a PV.
StorageClassTemplate for dynamic provisioning: provisioner, parameters, reclaim policy, and volumeBindingMode: WaitForFirstConsumer for zone-aware provisioning.
VolumeAttachmentRecords that a CSI volume is attached to a node.
CSIDriver / CSINodeDriver registration and per-node driver info.

Access control

3
ServiceAccountIdentity for pods. It gets short-lived, projected, auto-rotated JWT tokens; this is what IRSA and EKS Pod Identity build on.
Role / ClusterRoleA set of permissions (verbs on resources), namespaced or cluster-wide.
RoleBinding / ClusterRoleBindingGrant a role to users, groups, or ServiceAccounts.

Policy & scheduling

6
ResourceQuotaCaps total resource usage and object counts per namespace.
LimitRangeDefault and min/max requests and limits per container in a namespace.
PodDisruptionBudgetMinimum available pods during voluntary disruptions such as node drains and upgrades.
PriorityClassPod priority, used for scheduling order and preemption.
Pod Security AdmissionNamespace labels that enforce the privileged, baseline, or restricted profile.
RuntimeClassSelects a different runtime handler, such as gVisor or Kata.

Autoscaling

2
HorizontalPodAutoscalerScales replicas based on CPU, memory, or custom and external metrics.
VerticalPodAutoscalerAdd-on that adjusts requests and limits.

Cluster Autoscaler and Karpenter scale nodes, not pods.

Cluster & extensibility

7
NamespaceLogical isolation and scoping for names, RBAC, and quotas.
NodeRepresents a machine, with capacity, conditions, taints, and labels.
LeaseNode heartbeats and leader election.
EventRecords of what happened (Scheduled, Pulled, BackOff, and so on).
CustomResourceDefinitionAdds your own resource types. With a custom controller, this is the Operator pattern.
Webhook configs / ValidatingAdmissionPolicyMutating/ValidatingWebhookConfiguration and ValidatingAdmissionPolicy hook into the admission pipeline.
APIServiceRegisters aggregated APIs.

See the flow yourself

bash
kubectl apply -f deployment.yaml -v=8 # see the HTTP GET/POST/PATCH callskubectl get events -w --sort-by=.lastTimestamp # Scheduled, Pulling, Pulled, Created, Startedkubectl get rs,pods -l app=web -w # RS created, pods Pending -> ContainerCreating -> Runningkubectl get pod <pod> -o yaml # nodeName, conditions, ownerReferences, managedFieldscrictl pods && crictl ps # on the node: sandbox (pause) + containers

kubectl only writes desired state to the API server. The Deployment controller, ReplicaSet controller, scheduler, and kubelet each react to a watch event, do one small job, and write the result back. A pod runs because each of these loops independently observed the gap between spec and status and closed its part of it.