-
Monoliths: historically, applications were packaged and deployed as a single unit. For example, an Uber-like app might combine passenger management, payments, and driver logic in one codebase and one deployable artifact.
- Benefits: simple development workflow, one artifact to test and deploy, straightforward integration testing.
- Challenges: poor scalability (you must scale the entire app even when only one part needs more capacity), large codebase complexity, and frequent full redeploys for small changes.
-
Microservices: break the monolith into independently developed and deployed services.
- Benefits: independent scaling and release cadence, smaller service codebases.
- Challenges: service discovery, distributed configuration and logging, networked failure modes, and load balancing across many replicas.
-
Containers (OCI images): container runtimes (Docker, Buildah, etc.) make packaging reproducible and lightweight. Containers include the application and dependencies (no guest OS) and start quickly, improving developer velocity and deployment consistency.
- Example learning resources: Docker Training Course for the Absolute Beginner.
- Container orchestration: systems like Kubernetes operate containers at scale and add features such as autoscaling, self-healing, rolling updates, and pluggable networking and storage. Building images remains the job of CI/CD pipelines or build tools; Kubernetes does runtime orchestration.
- Managed or opinionated platforms (OpenShift, cloud-provider managed Kubernetes) combine orchestration with extra features: web consoles, integrated registries, CI tooling, and policy integrations.
- OpenShift moved from Docker to CRI-O as the default runtime and promotes Podman for local image workflows.
- Additional layers (API gateways, service meshes, policy engines) are often added on top of a platform for governance and security.
- Service meshes (Istio, Linkerd, etc.) provide advanced traffic control, mTLS, tracing, circuit breaking, and telemetry.
- Meshes add visibility and policy capabilities but also increase configuration and runtime complexity.
- Observability tooling complements meshes: Prometheus (metrics) and Grafana (visualization) are common pairings.
- Pod: the smallest deployable unit; one or more containers that share networking and volumes.
- Nodes: worker machines (VMs or physical servers) that run Pods. Use multiple worker nodes for high availability.
- Control plane (master nodes): manage cluster state and scheduling; you can run multiple control plane nodes for HA.
The kube-apiserver is the canonical gateway to cluster state. All controllers and clients interact with the cluster through the API server; etcd is never accessed directly by cluster users.
Do not access etcd directly for routine operations. Direct etcd manipulation risks data corruption. Use the API server and controller patterns for normal management. Note that the historical dockershim removal (Kubernetes v1.24) means you must use a CRI-compatible runtime such as containerd or CRI-O.
- The kubelet communicates with the container runtime via the Container Runtime Interface (CRI).
- Runtimes like containerd support multiple low-level runtimes (runc, runsc). gVisor (runsc) provides user-space syscall handling to increase isolation.
- Use
RuntimeClassto select a specific runtime for Pods (e.g., to sandbox with gVisor). Alternatively, apply seccomp or AppArmor profiles for syscall restrictions.
- Build an OCI-compliant image (Docker, Buildah, Kaniko) and push to a registry (Docker Hub, GCR, ECR, private registry).
- Create Pod/Deployment manifests referencing the image.
- The kubelet on the target node instructs the container runtime to pull and run the image.
- The runtime pulls, unpacks, and launches containers using the configured low-level runtime.
- Each Pod gets an IP assigned by the CNI plugin. Cross-node Pod communication relies on routing and node-level rules configured by the CNI.
- Services and Ingress provide stable access patterns.
Ingress provides HTTP(S) routing with host/path rules and TLS termination. Ingress controllers implement the ingress rules and map traffic to Services.
API server request lifecycle (authentication → authorization → admission)
When a request arrives at the API server it undergoes:
- Authentication — verify caller identity (certs, tokens, external identity providers).
- Authorization — check permissions (RBAC, ABAC, webhook-based policies).
- Admission control — mutating and validating webhooks and built-in admission controllers:
- MutatingAdmissionWebhook: can modify objects (e.g., sidecar injection).
- ValidatingAdmissionWebhook: enforces policies before persistence.
- Third-party policy engines (OPA/Gatekeeper, Kyverno) provide advanced policy enforcement.
Only after passing these stages is the object persisted to
etcdand controllers notified to reconcile.
- The API server communicates with
etcdusing etcd’s protocol (etcd v3 over gRPC). - Controllers, kubelet, and clients usually use REST/HTTP; client libraries can use protobuf over HTTP/2 for more efficient payloads where supported.
- Build and test code (unit tests, static analysis, security scans).
- Build container image and push to a registry.
- Scan images for vulnerabilities (Trivy, Clair) and validate manifests (
kubesec,kube-score). - Enforce policies via admission webhooks or policy engines (allowed registries, required labels, forbidden privileges).
- Deploy to Kubernetes (Deployments, StatefulSets). Consider canary/blue-green strategies and service-mesh traffic shaping.
- Monitor runtime behavior with metrics (Prometheus), visualizations (Grafana), tracing, logs, and runtime security tools (Falco).

- Kubernetes Documentation
- OpenShift 4 course
- Istio Service Mesh course
- Docker Training Course for the Absolute Beginner
- Prep Course - Prometheus Certified Associate (PCA) Certification
- Grafana Assistant
- Learn By Doing: Kubernetes Policies with Kyverno