🔗 Kubernetes Ecosystem & Tool Relationships
Kubernetes Ecosystem & Tool: Kubernetes is not a standalone tool — it's the hub of a modern DevOps ecosystem, and understanding how it connects to Docker, Jenkins, Kafka, and Hel
Kubernetes is not a standalone tool — it's the hub of a modern DevOps ecosystem, and understanding how it connects to Docker, Jenkins, Kafka, and Helm is exactly what separates a basic K8s user from a Senior DevOps/QA Engineer. So why does Kubernetes need all these other tools instead of doing everything itself (build images, run CI, manage messaging, template YAML)? Because Kubernetes's one job is running and healing containers reliably — bolting build, CI, messaging, and templating logic onto it would violate the same single-responsibility principle a Java architect applies when refusing to let one class also be its own database, scheduler, and logger. Docker builds the image, Jenkins decides WHEN to deploy it, Helm templates HOW it's deployed, Kafka lets the running pods talk to each other asynchronously — and Kubernetes just keeps whatever was declared, running. In a real incident, not knowing this boundary is how a team wastes hours debugging 'why is my pod unhealthy' when the real bug is in the Jenkins pipeline that built a broken image in the first place.
Docker ↔ Kubernetes: The Foundation
Docker builds images, Kubernetes runs them at scale
Docker builds container images. Kubernetes RUNS those images at scale. K8s no longer uses Docker daemon directly (deprecated in K8s 1.20+) — it uses containerd or CRI-O instead. But Docker is still used to BUILD the images. Analogy from Java world: Docker is like Maven packaging a JAR, Kubernetes is like the application server cluster running it.
Jenkins ↔ Kubernetes: CI/CD Pipeline
Jenkins builds, tests, and DEPLOYS to Kubernetes. A Jenkinsfile pipeline: 1) Runs tests, 2) Builds Docker image, 3) Pushes to registry, 4) Applies K8s manifests with kubectl. K8s can also RUN Jenkins build agents as pods — each build gets a clean container, like a fresh Java thread.
Jenkinsfile — pipeline that deploys to Kubernetes
Micro Lab: Kubernetes YAML manifest repair
Replace the TODO line with the critical line from the expected solution. This is not a real runtime; the goal is to reinforce writing the correct structure in a controlled way.
Why Does the Jenkins Pipeline Itself Run Inside a K8s Pod?
The pipeline dogfoods its own platform
The `agent { kubernetes {...} }` block means the CI agent ITSELF runs in a K8s pod — every build starts in a CLEAN environment.
Tests run BEFORE the image
The "Unit Tests" stage comes BEFORE any Docker image is built — broken code never even reaches the image.