CDM CDM Cloud & Containerization 1 — Questions and Answers
Question 1: What is the primary role of a container orchestration platform like Kubernetes in a DevOps environment?
- To compile application source code into container images
- To automate the deployment, scaling, and management of containerized applications across a cluster (Correct answer)
- To provide a graphical UI for developers to browse container registries
- To replace CI/CD pipelines for application delivery
Correct answer: To automate the deployment, scaling, and management of containerized applications across a cluster
Kubernetes automates scheduling, self-healing, scaling, and service discovery for containerized workloads across multiple nodes, enabling reliable production operations at scale.
Question 2: In Docker, what is the difference between a Docker image and a Docker container?
- An image is a running instance; a container is a blueprint
- An image is a read-only blueprint; a container is a running instance of that image (Correct answer)
- Images are used in development; containers are used only in production
- There is no difference — the terms are interchangeable
Correct answer: An image is a read-only blueprint; a container is a running instance of that image
A Docker image is an immutable, layered filesystem snapshot used as a template, while a container is a live, isolated process created from that image.
Question 3: Which Kubernetes object is responsible for ensuring that a specified number of identical pod replicas are running at all times?
- ConfigMap
- ReplicaSet (Correct answer)
- Namespace
- PersistentVolume
Correct answer: ReplicaSet
A ReplicaSet continuously monitors the cluster and creates or deletes pods to maintain the desired replica count specified in its configuration.
Question 4: What is a multi-stage Docker build and what is its main benefit?
- A build that runs across multiple CI/CD pipelines simultaneously
- A Dockerfile technique that uses intermediate build stages to produce a smaller final image by excluding build-time dependencies (Correct answer)
- A build strategy that deploys to multiple cloud regions at once
- A method for running multiple Dockerfiles in sequence in the same directory
Correct answer: A Dockerfile technique that uses intermediate build stages to produce a smaller final image by excluding build-time dependencies
Multi-stage builds allow you to compile and test code in a full build environment, then copy only the artifacts into a minimal runtime image, drastically reducing image size and attack surface.
Question 5: What does 'immutable infrastructure' mean in the context of cloud and containerization?
- Infrastructure that can never be scaled
- Servers and containers that are never modified after deployment — changes are made by replacing, not patching (Correct answer)
- Infrastructure that is locked to a single cloud provider
- Infrastructure provisioned manually and kept unchanged
Correct answer: Servers and containers that are never modified after deployment — changes are made by replacing, not patching
Immutable infrastructure replaces running instances with new ones built from a known-good image rather than patching in place, ensuring consistency and eliminating configuration drift.
Question 6: Which cloud service model gives a DevOps team the most control over the operating system and runtime environment?
- SaaS (Software as a Service)
- PaaS (Platform as a Service)
- IaaS (Infrastructure as a Service) (Correct answer)
- FaaS (Function as a Service)
Correct answer: IaaS (Infrastructure as a Service)
IaaS provides virtual machines where the team manages the OS, middleware, and runtime, offering the greatest control compared to PaaS or SaaS abstractions.
What is the primary role of a container orchestration platform like Kubernetes in a DevOps environment?