Microservices Containerization and Orchestration 3 — Questions and Answers
Question 1: What Kubernetes object stores non-confidential configuration data as key-value pairs?
- Secret
- ConfigMap (Correct answer)
- Volume
- ServiceAccount
Correct answer: ConfigMap
A ConfigMap holds non-sensitive configuration data injected into Pods.
Question 2: Which Docker concept allows data to persist beyond a container's lifecycle?
- Layer
- Volume (Correct answer)
- Tag
- Registry
Correct answer: Volume
Volumes store data outside the container's writable layer so it survives container removal.
Question 3: What does Kubernetes Horizontal Pod Autoscaler (HPA) adjust automatically?
- CPU limits per container
- The number of Pod replicas (Correct answer)
- The size of persistent volumes
- Node memory allocation
Correct answer: The number of Pod replicas
HPA scales the replica count up or down based on observed metrics like CPU.
Question 4: Which Kubernetes object is best suited for stateful applications requiring stable network identities?
- Deployment
- DaemonSet
- StatefulSet (Correct answer)
- Job
Correct answer: StatefulSet
A StatefulSet provides stable, unique network identifiers and ordered deployment for stateful apps.
Question 5: What is the role of a container registry such as Docker Hub?
- To orchestrate running containers
- To store and distribute container images (Correct answer)
- To monitor container health
- To define network policies
Correct answer: To store and distribute container images
A registry stores container images and serves them for pulls and pushes.
Question 6: Which Kubernetes resource exposes HTTP routes from outside the cluster to Services?
- Ingress (Correct answer)
- ConfigMap
- PersistentVolume
- ReplicaSet
Correct answer: Ingress
An Ingress manages external HTTP/HTTPS access and routing to internal Services.
Question 7: What does a multi-stage Docker build primarily help achieve?
- Faster container startup
- Smaller final image size (Correct answer)
- Automatic horizontal scaling
- Built-in service discovery
Correct answer: Smaller final image size
Multi-stage builds discard build-time dependencies, producing a leaner final image.
What Kubernetes object stores non-confidential configuration data as key-value pairs?