Day 1 of the #40DaysOfKubernetes Challenge — Key Takeaways
If you're on the path to becoming a Certified Kubernetes Administrator (CKA), there's one thing you can't skip: Docker. Before you can orchestrate containers at scale, you need to understand what a container actually is, how it runs, and why it exists. That's exactly what Day 1 of Piyush Sachdeva's CKA Full Course 2025 covers — and it's a surprisingly rich foundation.
Here's what I took away.
Why Docker Before Kubernetes?
Kubernetes doesn't run applications — it manages containers. And Docker is still the most widely used container runtime. Without understanding how Docker packages and runs an application, Kubernetes concepts like Pods, Deployments, and Services won't make intuitive sense. Docker is the vocabulary; Kubernetes is the grammar.
The Core Problem Docker Solves
Traditional application deployment had a notorious problem: "it works on my machine." Developers would build something locally, hand it over to ops, and watch everything break in production due to environment differences — OS versions, library mismatches, configuration drift.
Docker solves this with containerization — packaging your application along with all its dependencies (runtime, libraries, config) into a single portable unit called a container. Wherever that container runs, it behaves identically.
Virtual Machines vs. Docker Containers
This is one of the most clarifying comparisons in the entire course. Both VMs and containers provide isolation, but they do it very differently.
| Feature | Virtual Machine | Docker Container |
|---|---|---|
| Includes OS | Yes (full OS per VM) | No (shares host OS kernel) |
| Startup time | Minutes | Seconds |
| Size | GBs | MBs |
| Resource usage | Heavy | Lightweight |
| Isolation level | Strong | Process-level |
A VM virtualizes hardware and runs a full operating system on top. A container virtualizes at the OS level — it shares the host's kernel but keeps its own filesystem, processes, and network. This makes containers dramatically faster and lighter.
The key insight: Containers are not mini-VMs. They are isolated processes.
Docker Architecture: The Moving Parts
Understanding how Docker works internally removes a lot of confusion later. The architecture has three main components:
Docker Client — the CLI you interact with. When you type docker run, this is what you're talking to.
Docker Daemon (dockerd) — the background service that does the actual work: building images, running containers, managing volumes and networks.
Docker Registry — where images live. Docker Hub is the default public registry. You can also self-host a private registry. When you docker pull, you're fetching from here.
The flow is simple: Client → Daemon → Registry (if needed) → Container.
The Docker Workflow: From Code to Container
Dockerizing an application follows a consistent pattern:
- Write a Dockerfile — a text file with instructions on how to build your image (base image, copy code, install dependencies, set entry point).
-
Build the image —
docker buildreads your Dockerfile and creates an image layer by layer. -
Push to a registry —
docker pushuploads your image so others (or your cluster) can pull it. -
Run a container —
docker runcreates and starts a container from the image.
Each layer in a Docker image is cached. This means if your dependencies haven't changed, rebuilds are fast — only the changed layers are re-processed.
Essential Docker Commands to Know
These are the commands that will appear constantly in your workflow:
# Pull an image from Docker Hub
docker pull nginx
# Run a container (detached, with port mapping)
docker run -d -p 8080:80 nginx
# List running containers
docker ps
# List all containers (including stopped)
docker ps -a
# Stop a container
docker stop <container_id>
# Remove a container
docker rm <container_id>
# Build an image from a Dockerfile
docker build -t my-app:v1 .
# Push image to a registry
docker push myrepo/my-app:v1
# View logs
docker logs <container_id>
# Execute a command inside a running container
docker exec -it <container_id> bash
The CKA Connection
Everything in Kubernetes — from scheduling Pods to rolling deployments to health checks — assumes that your workloads are containers. Understanding Docker's image layering, container lifecycle, port mappings, and environment variables directly maps to Kubernetes concepts you'll encounter in later modules.
Day 1 isn't glamorous, but it's foundational. If you're solid on Docker, everything that follows in the 40-day challenge becomes much easier to absorb.
What's Next
The #40DaysOfKubernetes challenge by Piyush Sachdeva continues with container networking, Kubernetes architecture, Pods, ReplicaSets, and much more. The full course is free on YouTube and includes hands-on tasks on GitHub.
If you're preparing for the CKA exam or just want to level up your DevOps skills, this is a well-structured place to start.
Source: Day 1/40 — Docker Tutorial For Beginners, CKA Full Course 2025 by Tech Tutorials with Piyush
Top comments (0)