Developer
developerDeployments, Services, ConfigMaps, debugging pods, resource requests/limits, logs, events, kubectl/oc daily workflow.
K8s Core
Internals-first guides for developers, platform engineers, and architects—what the API server does with every kubectl apply, what etcd stores, what the kubelet executes on each node, and how OpenShift extends and hardens Kubernetes for enterprise environments.
Containers solved packaging. They did not solve running hundreds of them across dozens of servers: scheduling, self-healing when a node dies, rolling updates without downtime, service discovery without hardcoded IPs, and autoscaling when traffic spikes.
The pre-K8s world: SSH into servers, start containers manually, write brittle shell scripts for restarts, load-balance with nginx configs full of IP addresses, and pray nothing fails during a deploy. One server crash meant manual intervention at 3 AM.
Kubernetes is a control plane that continuously reconciles desired state (YAML in git) with actual state (running pods on nodes). Think of it as an airport control tower: you declare where planes should go; the tower schedules, routes, and reroutes when runways close—without you micromanaging each aircraft.
Before orchestration, every team reinvented the same fragile patterns. Kubernetes replaced ad-hoc scripts with declarative APIs and reconciliation loops.
SSH to servers, pull images, restart processes. No audit trail, no rollback, human error at every step.
Process crashes stay crashed until someone notices. Cron jobs restart things—sometimes twice, sometimes never.
Traffic spike? Provision VMs, install dependencies, configure load balancers—hours, not seconds.
Config files full of IP:port pairs. Every new instance means updating every client.
Declare desired state in YAML. Control plane schedules, heals, scales, and discovers—continuously.
Google ran Borg internally for a decade before open-sourcing Kubernetes in 2014. Spotify, Airbnb, and major banks migrated from bespoke schedulers and Mesos to K8s because the ecosystem, hiring pool, and CNCF governance made it the default platform layer.
All three schedule containers. Kubernetes won the market through extensibility (CRDs, operators), ecosystem depth, and cloud provider investment—not because it was the simplest option.
| Dimension | Kubernetes | Docker Swarm | HashiCorp Nomad |
|---|---|---|---|
| Complexity | High—control plane, many moving parts | Low—built into Docker Engine | Medium—single binary scheduler |
| Extensibility | CRDs, operators, admission webhooks, 1000+ integrations | Limited—no CRD equivalent | Task drivers, limited K8s overlap |
| Ecosystem | Helm, ArgoCD, Istio, Prometheus, cert-manager, Cluster API | Declining—Docker Inc. focus shifted | Strong in HashiCorp stacks (Consul, Vault) |
| Enterprise adoption | Default on every cloud; OpenShift, EKS, GKE, AKS | Legacy deployments only | Niche—batch + mixed workloads |
| Best fit | Platform teams, microservices, GitOps, multi-tenant clusters | Simple multi-node Docker Compose upgrade path | VM + container + batch unified scheduler |
Swarm and Nomad are valid for small, simple deployments. Kubernetes complexity pays off when you need RBAC, network policies, operators, multi-cluster GitOps, or a hiring pool of engineers who already know K8s.
If asked "why Kubernetes over alternatives?", cite declarative reconciliation, extensible API (CRDs), portable workload definitions, and CNCF ecosystem—not "Google uses it."
OpenShift Container Platform (OCP) is Red Hat's enterprise Kubernetes distribution. Same core API—different defaults, added operators, stricter security, and integrated developer tooling.
What OCP restricts: no root containers by default (restricted-v2 SCC), stricter network policy defaults, no arbitrary hostPath mounts, SCC admission rejects pods that don't match granted constraints. Editions: OCP (self-managed), ROSA (AWS), ARO (Azure), RHOCP on GCP, MicroShift (edge/IoT).
Manifests that work on vanilla K8s often fail on OpenShift with unable to validate against any security context constraint. Fix: run as non-root random UID, drop capabilities, or grant a specific SCC to the ServiceAccount—not privileged in production.
Core K8s is the foundation. Production clusters layer packaging, GitOps, service mesh, observability, certificates, DNS, and cluster lifecycle tools on top.
Don't install everything day one. Start with metrics-server, an ingress controller, and cert-manager. Add GitOps when manual kubectl apply becomes a bottleneck.
From Google internal Borg lessons to the CNCF graduated standard every cloud runs.
Announced at DockerCon. Built on Borg/Omega experience—declarative APIs, reconciliation loops, label selectors.
Production-ready API. Kubernetes donated to newly formed Cloud Native Computing Foundation.
Per-node workloads and stable network identity for stateful apps—foundation for operators.
Production RBAC replaces ABAC. CustomResourceDefinitions enable the operator ecosystem.
Standard HTTP routing resource—still requires external ingress controller.
kubectl apply --server-side—field ownership tracking, safer multi-controller merges.
PSP removed in 1.25. Pod Security Admission (PSA) replaces it as built-in admission controller.
Namespace-level security profiles (privileged/baseline/restricted). Debug running pods without restart.
Init containers with restartPolicy: Always—proper sidecar lifecycle (K8s 1.29+).
Adjust CPU/memory requests without pod restart—reduces churn for VPA workflows.
From PaaS platform to enterprise Kubernetes distribution with operators and immutable infrastructure.
Red Hat PaaS with custom cartridge model—predates wide Kubernetes adoption.
Rebuilt on upstream K8s. DeploymentConfig, Routes, S2I builds become OCP differentiators.
RHCOS immutable nodes. Cluster Version Operator manages upgrades. OperatorHub launches.
Red Hat OpenShift Service on AWS—managed OCP with Red Hat SRE operations.
Advanced Cluster Management for multi-cluster policy and application delivery at scale.
HyperShift-based hosted control planes—faster, cheaper multi-cluster provisioning on ROSA/AWS.
oc is a superset of kubectl—every kubectl command works in oc, plus OpenShift-specific commands for Routes, Builds, ImageStreams, and projects.
$ kubectl create deployment web --image=nginx:1.25 --replicas=3 $ kubectl expose deployment web --port=80 --type=ClusterIP $ kubectl get pods -l app=web -w$ oc new-app nginx:1.25 --name=web → Deployment, Service, and Route created automatically $ oc expose svc/web $ oc get route web
Both CLI tools are thin clients. Every command becomes an HTTPS request to the API server— GET /api/v1/namespaces/default/pods for kubectl get pods. Authentication via kubeconfig certs or token; authorization via RBAC before any change persists to etcd.
Use kubectl explain pod.spec.containers.resources (or oc explain) to explore API fields without leaving the terminal—essential for CKA/CKAD prep.
Every cluster change flows through the API server to etcd. The scheduler assigns pods; controllers reconcile; kubelets on worker nodes make containers actually run.
kubectl / oc
Declarative YAML → HTTPS API request
API Server
Auth → RBAC → admission → validate → etcd
etcd
Single source of truth — Raft consensus
Scheduler + Controllers
Assign nodes · reconcile desired state
kubelet → CRI
Pull image · start container · report status
flowchart TB
subgraph cp["Control plane"]
API["kube-apiserver"]
ETCD["etcd\nRaft quorum"]
SCH["kube-scheduler"]
CM["kube-controller-manager"]
end
subgraph worker["Worker node"]
KL["kubelet"]
KP["kube-proxy"]
CRI["containerd / CRI-O"]
P["Pod containers"]
end
CLI["kubectl / oc"] --> API
API --> ETCD
API --> SCH
API --> CM
SCH --> API
CM --> API
KL --> API
KL --> CRI
CRI --> P
KP --> P
etcd space quota exceeded (default 2GB) causes API write failures cluster-wide. Monitor etcd_server_has_leader and disk usage. Regular etcdctl snapshot save backups are non-negotiable for production.
Production etcd: 3 or 5 nodes (odd for quorum), dedicated SSD, <10ms latency. Never run workloads on control plane nodes in production clusters.
Fifteen deep-dive chapters plus cheat sheets. Recommended path: Architecture → Workloads → Networking → RBAC, then GitOps and production ops as your role requires.
Learning path: Architecture · Workloads · Networking · Storage · RBAC
Deployments, Services, ConfigMaps, debugging pods, resource requests/limits, logs, events, kubectl/oc daily workflow.
Cluster admin, RBAC, networking policies, storage classes, ingress, Helm, operators, upgrades, observability stack.
Multi-cluster strategy, PSA/SCC posture, service mesh, GitOps architecture, OpenShift vs K8s trade-offs, DR and capacity planning.
API server, etcd, scheduler, controllers, kubelet, kube-proxy—internals of every component.
Pods, Deployments, StatefulSets, Jobs, HPA, PDB—rolling updates and autoscaling.
ClusterIP, Ingress, Gateway API, CNI, NetworkPolicy, OpenShift Routes.
PV/PVC, StorageClasses, CSI, snapshots, StatefulSet patterns, ODF on OCP.
ConfigMaps, Secrets, Sealed Secrets, Vault integration, quotas and LimitRanges.
Authentication, RBAC, PSA, SCC, OPA/Kyverno, LDAP, audit logging.
Metrics, logs, tracing—Prometheus, Loki, OpenTelemetry, OCP monitoring stack.
Charts, overlays, production packaging, OpenShift Templates and OperatorHub.
ArgoCD, Flux, Tekton, OpenShift Pipelines, S2I builds, GitOps patterns.
Taints, affinity, topology spread, node management, resource QoS classes.
Custom resources, operator pattern, OLM, OperatorHub, maturity model.
ACM, hosted control planes, Cluster API, OpenShift Service Mesh.
Upgrades, DR, Velero, capacity planning, common failure modes and fixes.
Developer, DevOps, and architect quick references with copy-to-clipboard.