🌍 DevOps · subject

DevOps Containerization Syllabus

The Containerization syllabus for DevOps in full: 3 chapters and 10 topics, every one listed below, plus 50 Containerization flashcards with answers.

3Chapters
10Topics
50Flashcards

Containerization syllabus: all 3 chapters

Expand any chapter to see its topics and sub-topics.

  1. Introduction to Containers

    2 topics
    • Container Concepts and Practices
    • Benefits of Containers
  2. Docker Basics

    4 topics
    • Installing Docker
    • Docker Commands: build, run, images, ps
    • Dockerfile Basics
    • Docker Compose
  3. Kubernetes Basics

    4 topics
    • Installing Kubernetes
    • Kubernetes Architecture
    • Kubernetes Objects: Pods, Services, Deployments
    • Helm

DevOps Containerization flashcards — 50 questions with answers

  1. What is a container in the context of software deployment?

    A lightweight, standalone, executable package that bundles an application together with its code, runtime, system libraries, and dependencies, so it runs consistently across any environment.

  2. How does a container differ from a virtual machine (VM)?

    A container virtualizes the operating system and shares the host OS kernel (no guest OS), making it lightweight and fast to start; a VM virtualizes hardware and runs a full guest OS via a hypervisor, making it heavier and slower.

  3. What two Linux kernel features make container isolation possible?

    Namespaces (isolate what a process can see: PIDs, network, mounts, users) and cgroups (control groups, which limit and account for resource usage such as CPU and memory).

  4. What is a container image versus a running container?

    An image is a read-only template (a stack of layers) containing the app and its dependencies; a container is a running, writable instance created from that image.

  5. List four key benefits of using containers.

    Portability (run anywhere), consistency across environments, efficient resource use / lightweight, fast startup, and easy scalability/isolation.

  6. Why do containers start much faster than virtual machines?

    Containers share the host kernel and do not need to boot a separate guest operating system, so only the application process must start, taking seconds or less.

  7. What problem does containerization solve regarding the phrase 'it works on my machine'?

    By packaging the app with all its dependencies into a portable image, the same environment runs identically on a developer laptop, CI server, and production, eliminating environment drift.

  8. What is Docker?

    An open-source platform and runtime for building, shipping, and running applications inside containers using OS-level virtualization.

  9. What is the Docker Engine composed of?

    The Docker daemon (dockerd, a long-running server process), a REST API, and the Docker CLI client that talks to the daemon.

  10. What is Docker Hub?

    Docker's default public registry where container images can be stored, shared, and pulled (e.g., official images like nginx, ubuntu, postgres).

  11. On Linux, what package commonly provides the easiest way to install Docker for development?

    Docker Desktop, or installing Docker Engine via the official convenience script / distribution package (e.g., apt-get install docker-ce on Debian/Ubuntu).

  12. What command verifies that Docker is installed and the daemon is running?

    docker version (shows client and server versions) or docker info; docker run hello-world tests an end-to-end pull and run.

  13. What does the command 'docker build' do?

    It reads a Dockerfile and build context and produces a container image, executing each instruction as a cached layer.

  14. What is the purpose of the -t flag in 'docker build -t myapp:1.0 .'?

    It tags the resulting image with a name and tag (myapp version 1.0); the trailing dot specifies the current directory as the build context.

  15. What does 'docker run' do?

    It creates a new container from an image and starts it, optionally pulling the image first if it is not present locally.

  16. In 'docker run -d -p 8080:80 nginx', what do -d and -p mean?

    -d runs the container detached (in the background); -p 8080:80 publishes/maps host port 8080 to container port 80.

  17. What does 'docker ps' show, and how do you see stopped containers too?

    docker ps lists running containers; docker ps -a lists all containers including stopped ones.

  18. What does 'docker images' display?

    A list of images stored locally, showing repository, tag, image ID, creation date, and size.

  19. Which command opens an interactive shell inside a running container?

    docker exec -it <container> /bin/bash (or /bin/sh); -i keeps stdin open and -t allocates a pseudo-TTY.

  20. What is the difference between 'docker stop' and 'docker kill'?

    docker stop sends SIGTERM then SIGKILL after a grace period (graceful shutdown); docker kill sends SIGKILL immediately (forceful).

Show the other 30 Containerization flashcards
  1. What is a Dockerfile?

    A text file containing a sequence of instructions that Docker reads to automatically build a container image.

  2. What does the FROM instruction do in a Dockerfile, and where must it appear?

    It specifies the base image to build upon and must be the first instruction (except for ARG).

  3. What is the difference between the COPY and ADD instructions in a Dockerfile?

    COPY simply copies files/directories from the build context into the image; ADD does the same but additionally can extract local tar archives and fetch remote URLs. COPY is preferred for clarity.

  4. What is the difference between RUN, CMD, and ENTRYPOINT?

    RUN executes commands at build time to create image layers; CMD provides the default command/arguments at container start (easily overridden); ENTRYPOINT sets the main executable that always runs, with CMD supplying its default arguments.

  5. What does the WORKDIR instruction do?

    It sets the working directory for subsequent RUN, CMD, COPY, and ENTRYPOINT instructions, creating it if it does not exist.

  6. What is the purpose of the EXPOSE instruction in a Dockerfile?

    It documents which network ports the container listens on at runtime; it does not actually publish the port (that requires -p at runtime).

  7. What is a multi-stage build and why is it used?

    A Dockerfile with multiple FROM stages where build artifacts are produced in one stage and copied into a slim final stage, yielding smaller, more secure production images without build tools.

  8. What is Docker Compose?

    A tool for defining and running multi-container Docker applications using a single declarative YAML file (compose.yaml / docker-compose.yml).

  9. Which command starts all services defined in a Compose file in the background?

    docker compose up -d (the -d runs detached).

  10. What does 'docker compose down' do?

    It stops and removes the containers, default network, and (optionally with --volumes) the volumes created by 'compose up'.

  11. In a Compose file, what is the purpose of the 'depends_on' key?

    It controls the start-up and shutdown order of services, ensuring one service starts after the services it lists (note: it waits for start, not for readiness).

  12. What is Kubernetes?

    An open-source container orchestration platform that automates the deployment, scaling, healing, and management of containerized applications across a cluster of machines.

  13. What are the common tools for installing a local single-node Kubernetes cluster?

    Minikube, kind (Kubernetes in Docker), k3s, or Docker Desktop's built-in Kubernetes; kubeadm is used for bootstrapping production-style clusters.

  14. What is kubectl?

    The Kubernetes command-line client used to communicate with the cluster's API server to create, inspect, and manage resources.

  15. What are the two main parts of Kubernetes cluster architecture?

    The control plane (master components that manage the cluster) and the worker nodes (which run the application workloads).

  16. Name the four core control plane components and their roles.

    kube-apiserver (front-end/API), etcd (key-value store for cluster state), kube-scheduler (assigns Pods to nodes), and kube-controller-manager (runs controllers that reconcile desired state).

  17. What is etcd in Kubernetes?

    A consistent, distributed key-value store that holds all cluster data and configuration, acting as the single source of truth for cluster state.

  18. Name the key components that run on every Kubernetes worker node.

    kubelet (agent that manages Pods/containers), kube-proxy (handles networking/Service routing), and a container runtime (e.g., containerd).

  19. What is the role of the kube-scheduler?

    It watches for newly created Pods with no assigned node and selects an appropriate node for them based on resource requirements, constraints, and policies.

  20. What is a Pod in Kubernetes?

    The smallest deployable unit; one or more tightly coupled containers that share the same network namespace (IP), storage volumes, and are scheduled together on one node.

  21. Why are Pods considered ephemeral?

    Pods are disposable: if one dies it is not resurrected but replaced by a new Pod (with a new IP) by its controller, so workloads should not depend on a specific Pod identity.

  22. What is a Kubernetes Service and what problem does it solve?

    A Service is a stable abstraction that exposes a logical set of Pods (selected by labels) under a single, persistent IP/DNS name, providing load balancing despite Pods being ephemeral.

  23. Compare the ClusterIP, NodePort, and LoadBalancer Service types.

    ClusterIP exposes the Service only inside the cluster (default); NodePort exposes it on a static port on every node's IP; LoadBalancer provisions an external cloud load balancer to route traffic in.

  24. What is a Deployment in Kubernetes?

    A controller that manages a ReplicaSet to maintain a desired number of identical Pods, providing declarative updates, rolling updates, and rollbacks for stateless applications.

  25. What is the relationship between a Deployment, a ReplicaSet, and Pods?

    A Deployment manages ReplicaSets, and each ReplicaSet ensures the specified number of Pod replicas are running; updating a Deployment creates a new ReplicaSet.

  26. How do you scale a Deployment named web to 5 replicas using kubectl?

    kubectl scale deployment web --replicas=5 (or edit the spec.replicas field in the manifest).

  27. What is a rolling update in a Kubernetes Deployment?

    A strategy that incrementally replaces old Pods with new ones (respecting maxSurge and maxUnavailable) so the application is updated with zero downtime.

  28. What is Helm?

    A package manager for Kubernetes that lets you define, install, and upgrade applications using reusable, versioned packages called charts.

  29. What is a Helm chart, and what is a 'release'?

    A chart is a packaged collection of templated Kubernetes manifests plus default values; a release is a specific installed instance of a chart running in a cluster.

  30. What is the purpose of the values.yaml file in a Helm chart?

    It supplies the default configuration values that are injected into the chart's templates, allowing customization at install/upgrade time without editing the templates.

DevOps Containerization FAQ

What is in the DevOps Containerization syllabus?

DevOps Containerization is split into 3 chapters: Introduction to Containers, Docker Basics and Kubernetes Basics. Together they contain 10 topics.

How many chapters are in DevOps Containerization?

3 chapters, containing 10 topics. The largest chapter is Docker Basics, with 4 topics.

Are there flashcards for DevOps Containerization?

Yes — a 50-card Containerization deck, printed in full in the flashcards section of this page and available in the Examius app with spaced repetition. The free plan covers one exam of your choice, including its flashcards; Examius Pro, a one-time purchase, unlocks every other exam and deck.