Kubernetes Overview
Kubernetes (often shortened to K8s) is an open-source container orchestration platform.
It automates deploying, scaling, and managing containerized applications across clusters of machines.
Why Kubernetes?
Section titled “Why Kubernetes?”- Containers alone aren’t enough. A single
docker runworks for one machine, but production needs scheduling across many nodes, self-healing, load balancing, rolling updates, and secret management. - Kubernetes handles that orchestration. You describe the desired state (e.g. “run 3 replicas of this container”) and Kubernetes continuously works to make reality match.
Key Terminology
Section titled “Key Terminology”- Cluster — A set of machines (nodes) managed by Kubernetes.
- Node — A single machine in the cluster (physical or virtual). Runs containers.
- Pod — The smallest deployable unit; one or more containers that share network and storage.
- Service — A stable network endpoint that routes traffic to a set of pods.
- Deployment — Declares the desired state for pods (image, replicas, update strategy). Kubernetes creates and manages the pods.
- Namespace — A virtual partition inside a cluster for isolating resources.
- kubectl — The CLI tool for interacting with a Kubernetes cluster.
How These Docs Are Organized
Section titled “How These Docs Are Organized”Guides are grouped by domain (same groups as the sidebar):
Fundamentals
Section titled “Fundamentals”- Architecture — Control plane, worker nodes, and how the pieces fit together.
- Scheduling and Placement — Predicate vs priority scheduling, PriorityClass, and Pending triage vocabulary.
- Etcd and Control Plane Health — etcd role, health signals, snapshots, and control-plane certificate rotation.
- Core Objects — Pods, Deployments, Namespaces, Labels, and YAML anatomy.
- Manifests — YAML structure, the four top-level fields, spec vs status, and applying manifests.
Networking
Section titled “Networking”- Networking — Services, Ingress, Gateway API vs Ingress, CNI comparison, DNS, network policies, and CoreDNS failure modes.
- Services and Endpoints — ClusterIP datapath, EndpointSlices, kube-proxy modes, and debugging.
- Network Policies — Default deny, allowlists, metadata egress, and CNI compatibility.
- Sidecar Pattern — When to use sidecars, sidecar vs library trade-offs, and production rollout patterns.
- Ingress Controllers — NGINX, Traefik, and AWS Load Balancer Controller with TLS/mTLS and cert-manager patterns.
- Istio — Service mesh architecture, VirtualService, mTLS, and troubleshooting with istioctl.
Workloads
Section titled “Workloads”- Workload Types — Deployments vs StatefulSets vs DaemonSets vs Jobs and CronJob patterns.
- Storage — Volumes, PVCs, StorageClass binding modes, topology, and Secrets.
- Stateful Backup and Restore — Snapshots, Velero, restore drills, and RPO/RTO.
Delivery
Section titled “Delivery”- Helm — Package management for Kubernetes.
- Helm Templating — Go template syntax, value injection methods, and where values come from in production.
- Helm vs Operators vs GitOps — When to use Helm charts, operators, and Argo CD/Flux, and how they work together.
- Argo CD — Install, Applications, App of Apps, ApplicationSets, sync waves, and multi-cluster registration.
- Operators — CRDs, custom controllers, the reconcile loop, and building your own operator.
- Crossplane — Cloud infrastructure as Kubernetes resources; compositions; GitOps and Terraform relationship.
- For GitOps practice (pull model, repo layouts, Flux), see GitOps in the CI/CD section.
Production
Section titled “Production”- Production Platform Checklist — Layered platform checks for ownership, blast radius, delivery guardrails, and drift.
- Production Patterns — Health checks, resource limits, noisy-neighbor mitigation, PDBs, draining, and rolling updates.
- Autoscaling on EKS — HPA, VPA, KEDA, Cluster Autoscaler, and Karpenter; custom metrics via Prometheus or CloudWatch.
- Production Scenarios — Scenario-based practice for production reasoning and mitigation planning.
- Cluster Upgrades — Control plane vs nodes, add-on smoke tests, CRD compatibility, and certificate inventory.
- Cluster Lifecycle Tools — kops, EKS variants, Cluster API, kubeadm, and other create/upgrade choices.
- Multi-Cluster Management — Cluster API, Karmada, and GitOps fleet patterns across clusters.
Security
Section titled “Security”- Kubeconfig and Authentication — Client TLS, OIDC, and EKS
get-tokenpatterns. - RBAC — Roles, bindings, blast radius, and
kubectl auth can-i. - Pod Security Standards — What PSA blocks vs allows, choosing Baseline or Restricted, rollout, exemptions, and Restricted-friendly manifests.
- Admission Controllers — Mutating/validating webhooks, failurePolicy, and policy engines.
- Multi-Tenancy and Policy — Namespaces, quotas, shared ingress fairness, and audit logging.
Reference
Section titled “Reference”- Kubectl Reference — Common commands grouped by task.
- Troubleshooting and Debugging — A practical production triage flow across workloads, cluster signals, and networking.
- Architecture Review Questions — High-signal prompts for architecture reviews and production readiness checks.
- Architecture Review Answers — Concise reference answers for the discussion prompts by domain, with links to deeper guides.
Examples
Section titled “Examples”- Examples — File-oriented layouts (base workloads, Istio, kubectl vs Argo CD).
- HA Kubernetes on Two Proxmox Hosts — Four-part lab building a host-loss-tolerant kubeadm cluster: external etcd, kube-vip, Cilium, Longhorn, and failure drills.
- EKS (AWS) — Amazon EKS overview and a production-oriented cluster with Terraform (VPC, private API, node groups, add-ons). Uses the AWS networking and VPC connectivity guides for prerequisites.
- Migrating Workloads From EC2 to EKS — Phased cutover, DNS and traffic shift, data, and rollback framing.
- Prometheus Adapter for HPA on EKS — Custom metrics from PromQL for HPA.
- Container Insights for HPA on EKS — CloudWatch external metrics for HPA.
- EKS Troubleshooting Cheat Sheet — Symptom-driven EKS debugging runbook for networking, autoscaling, and on-call triage.
How Platform Teams Think About Layers
Section titled “How Platform Teams Think About Layers”Docs are filed by the domain folders above. Platform teams often slice the same material by layer. Use this map when you are reasoning about ownership or designing a platform:
| Layer | Meaning | Start Here |
|---|---|---|
| Cluster | Control plane, nodes, lifecycle, access to the API | Architecture, Etcd and Control Plane Health, Scheduling, Cluster Lifecycle Tools, Cluster Upgrades, Multi-Cluster, Kubeconfig, EKS |
| Apps | Workload APIs and traffic into applications | Core Objects, Manifests, Workload Types, Storage, Networking, Ingress Controllers, Istio |
| Platform | Shared services, packaging, and policy | Helm, Argo CD, Operators, Crossplane, Helm vs Operators vs GitOps, GitOps practice (Flux), RBAC, Pod Security Standards, Admission Controllers, Multi-Tenancy, Autoscaling |
| Ops | Runbooks, reliability, and reviews | Production Patterns, Production Scenarios, Production Platform Checklist, Troubleshooting, Kubectl Reference, Architecture Review Questions |