What is Kubernetes and how does it relate to Docker?
Why Interviewers Ask This
Candidates at the intermediate level are expected to not only know this concept but explain the trade-offs involved. Interviewers use this question to see if you can reason about design decisions, not just recall facts.
Answer
Kubernetes (K8s) is an open-source container orchestration platform originally developed by Google, now maintained by the CNCF (Cloud Native Computing Foundation). It automates deployment, scaling, and management of containerized applications across clusters. Relationship to Docker: Kubernetes uses containers (Docker or other OCI-compliant runtimes like containerd, CRI-O) as the building blocks. Docker packages applications into container images; Kubernetes schedules and runs those containers at scale across many nodes. Kubernetes deprecated Docker as its default container runtime (in favor of containerd) but still runs Docker images — Docker images follow the OCI (Open Container Initiative) image spec which all runtimes support. Key Kubernetes concepts: Pod — smallest deployable unit (one or more containers sharing network/storage); Deployment — declares desired state for stateless apps (replicas, update strategy); Service — stable network endpoint for a set of Pods; ConfigMap/Secret — configuration and secrets storage; Ingress — HTTP routing and TLS termination; PersistentVolume — storage; Namespace — logical isolation within a cluster. Managed K8s: EKS (AWS), GKE (Google), AKS (Azure) — they manage the control plane for you.
Common Mistake
Rushing to answer is a common mistake. Take two seconds to structure your response: definition → example → trade-off. This structure makes complex Docker answers easy to follow.
Previous
What is container orchestration and what problems does it solve?
Next
What is a Docker registry mirror?