CDM CDM Cloud & Containerization 2 — Questions and Answers
Question 1: In Kubernetes, what is the purpose of a Liveness Probe?
- To check whether the container image is up to date in the registry
- To determine if a container is still running correctly, restarting it if it fails the check (Correct answer)
- To measure CPU and memory utilization of a running pod
- To validate the Kubernetes YAML manifest syntax before apply
Correct answer: To determine if a container is still running correctly, restarting it if it fails the check
A liveness probe periodically checks whether a container's application is healthy; if the probe fails, the kubelet kills and restarts the container automatically.
Question 2: What is the key difference between a Kubernetes Deployment and a StatefulSet?
- Deployments are for cloud use; StatefulSets are for on-premises only
- StatefulSets provide stable network identities and ordered pod management, making them suited for stateful applications like databases (Correct answer)
- Deployments support rolling updates while StatefulSets do not support any updates
- StatefulSets can only run a single replica while Deployments support multiple
Correct answer: StatefulSets provide stable network identities and ordered pod management, making them suited for stateful applications like databases
StatefulSets assign each pod a stable hostname and persistent volume, and they start/stop pods in order — critical requirements for databases and distributed stateful systems.
Question 3: What is a Kubernetes ConfigMap used for?
- Storing sensitive credentials such as passwords and API keys
- Storing non-sensitive configuration data as key-value pairs that pods can consume as environment variables or files (Correct answer)
- Defining network policies between pods
- Managing cluster-wide resource quotas and limits
Correct answer: Storing non-sensitive configuration data as key-value pairs that pods can consume as environment variables or files
ConfigMaps decouple configuration from container images, allowing environment-specific settings to be injected into pods without rebuilding the image.
Question 4: Which cloud-native pattern involves running multiple identical instances of a service and distributing traffic across them to improve availability?
- Circuit breaker
- Horizontal scaling (scaling out) (Correct answer)
- Vertical scaling (scaling up)
- Bulkhead isolation
Correct answer: Horizontal scaling (scaling out)
Horizontal scaling adds more instances of a service behind a load balancer, distributing load and eliminating single points of failure for high availability.
Question 5: What is a Helm chart in the Kubernetes ecosystem?
- A visual dashboard for monitoring Kubernetes cluster health metrics
- A package manager template that bundles Kubernetes manifests for easier deployment and versioning of applications (Correct answer)
- A network policy enforcement tool for inter-pod communication
- A GitOps tool that syncs manifests from a Git repository to a cluster
Correct answer: A package manager template that bundles Kubernetes manifests for easier deployment and versioning of applications
Helm charts package Kubernetes YAML templates with configurable values, enabling repeatable, versioned application deployments with a single `helm install` command.
Question 6: In cloud DevOps, what is 'auto-scaling' and which metric is most commonly used to trigger it?
- Automatically restarting failed containers, triggered by pod crash logs
- Automatically adding or removing compute instances based on demand, most commonly triggered by CPU utilization thresholds (Correct answer)
- Automatically updating container images when a new version is pushed to the registry
- Automatically balancing storage across availability zones based on disk IOPS
Correct answer: Automatically adding or removing compute instances based on demand, most commonly triggered by CPU utilization thresholds
Auto-scaling adjusts the number of running instances in response to load; CPU utilization is the most common trigger, though memory, request rate, and custom metrics are also used.
In Kubernetes, what is the purpose of a Liveness Probe?