01Architecture — Control Plane Deep
↕
kube-apiserver ← REST endpoint, auth/authz, admission webhooks, watches
↕
kube-scheduler kube-controller-manager cloud-controller
↓ (watch API, assign node) ↓ (reconcile loops) ↓ (cloud LBs, volumes)
kubelet (each node) ← watch API, runs pods via CRI (containerd)
↕
kube-proxy ← iptables/IPVS rules for Service routing
02Key Concepts
etcd + Raft
- All K8s state: pod specs, secrets, configmaps in etcd
- Raft quorum: 3 or 5 members (n/2+1 write quorum)
- etcd is the only stateful component — backup critical
- Watch API: long-poll on key prefix → event streaming
- Leader election: controllers use etcd distributed locks
Pod Lifecycle
- Pending → ContainerCreating → Running → Terminating
- Init containers: run before main containers
- Sidecar pattern: shared namespace, lifecycle coupling
- Graceful shutdown: SIGTERM → preStop hook → 30s grace → SIGKILL
- readinessProbe: removes from Service endpoints (critical!)
Networking: CNI
- Every pod gets unique IP, flat network (no NAT intra-cluster)
- CNI plugins: Calico (BGP), Flannel (VXLAN), Cilium (eBPF)
- Cilium: replaces kube-proxy with eBPF, no iptables
- Network Policy: L3/L4 firewall (Calico extends to L7)
- Pod-to-pod: route via node veth pair + bridge
Services + kube-proxy
- ClusterIP: virtual IP, iptables DNAT to pod IPs
- NodePort: exposes on every node (30000-32767)
- LoadBalancer: cloud LB integration
- Headless: no VIP, DNS returns pod IPs (StatefulSets)
- IPVS mode: O(1) routing vs iptables O(n) — use for large clusters
Resource Management
- Requests: scheduling guarantee, cgroup reserved
- Limits: cgroup enforcement (memory: OOMKill, CPU: throttle)
- QoS: Guaranteed (req==lim), Burstable (req
- HPA: scale on CPU/memory/custom metrics (via Prometheus adapter)
- VPA: adjust requests based on actual usage
RBAC
- ServiceAccount: identity for pods (JWT projected into pod)
- Role/ClusterRole: what verbs on what resources
- RoleBinding: binds subject to role in namespace
- Principle of least privilege: no default service account power
- IRSA (AWS): ServiceAccount → IAM role via OIDC
03Must-Know Deep Dives
🔥 Operators + CRDs — K8s Extensibility Model
CRD (Custom Resource Definition): extend K8s API with your own resources. kubectl apply -f my-cbdc-node.yaml just like a Deployment. An Operator = CRD + Controller that reconciles desired state.
Reconcile Loop: Watch CRD events → compare actual state vs desired → apply changes → requeue on error. Idempotent by design. Your Hyperledger Fabric multi-environment Helm deployments could have been an Operator — think about this.
🔥 Admission Webhooks — Intercept All API Calls
Mutating admission webhooks: modify resources before persistence. Validating: reject invalid resources. Every kubectl apply goes through these. Istio, OPA/Gatekeeper, Kyverno all use admission webhooks.
Your use case: Automatically inject Kafka sidecar config into pods with annotation kafka.io/inject: "true". Set default resource limits if not specified. Block pods without security context. This is production-grade K8s engineering.
🔥 StatefulSets — When Pods Need Identity
StatefulSet guarantees: stable network ID (pod-0, pod-1, pod-2), stable storage (PVCs not deleted on reschedule), ordered deployment. Each pod DNS: pod-0.service.namespace.svc.cluster.local.
When to use: Kafka (brokers need stable broker.id), databases (replication requires leader election by identity), Hyperledger Fabric peers (your use case — each org peer needs persistent identity + TLS certs).
Headless Service + StatefulSet: headless service creates DNS A records per pod — clients can discover individual replicas. Used by Cassandra for peer discovery, ZooKeeper for quorum, your Fabric orderers.
🔥 Production Debugging Playbook
04Resources
Best architecture walkthrough. Dense, no fluff. Watch at 1.5x.
Production-grade operator patterns. The best operator resource available.
Canonical definition. Read alongside controller-runtime examples.
eBPF vs iptables in real numbers. Critical for networking interview questions.
200+ item checklist. Skip what you know. Hits resource limits, probes, security, anti-affinity.
Given your Helm experience — this will surface gaps you didn't know you had.