KCNA Container Orchestration 4 — Questions and Answers
Question 1: What Kubernetes feature allows you to run multiple containers that share the same network namespace within a single Pod?
- Multi-container Pods (Correct answer)
- Pod networking plugin
- Container Network Interface
- Service Mesh sidecar injection
Correct answer: Multi-container Pods
Kubernetes allows multiple containers in a Pod to share the same network namespace, IP address, and port space.
Question 2: Which Kubernetes component stores the entire cluster state, including configuration and status of all objects?
- kube-apiserver
- kube-controller-manager
- etcd (Correct answer)
- kube-scheduler
Correct answer: etcd
etcd is the distributed key-value store that Kubernetes uses as its backing store for all cluster data.
Question 3: A Deployment is updated with a new image. Which strategy replaces Pods one at a time, ensuring no downtime?
- Recreate
- RollingUpdate (Correct answer)
- BlueGreen
- Canary
Correct answer: RollingUpdate
The RollingUpdate strategy incrementally replaces old Pods with new ones, keeping the application available during the update.
Question 4: What does `kubectl rollout undo deployment/my-app` do?
- Deletes the Deployment and recreates it
- Rolls back the Deployment to the previous revision (Correct answer)
- Pauses the current rollout
- Scales the Deployment to zero replicas
Correct answer: Rolls back the Deployment to the previous revision
The `rollout undo` command reverts a Deployment to its previous revision stored in its rollout history.
Question 5: Which Kubernetes concept allows cluster operators to restrict the total amount of CPU and memory that can be consumed within a namespace?
- LimitRange
- ResourceQuota (Correct answer)
- PriorityClass
- NetworkPolicy
Correct answer: ResourceQuota
ResourceQuota sets aggregate limits on resource consumption (CPU, memory, object count) for an entire namespace.
Question 6: In container orchestration, what is meant by 'desired state'?
- The current running state of the system
- The user-specified configuration that the orchestrator continuously tries to achieve and maintain (Correct answer)
- The maximum resource capacity of the cluster
- The last successfully deployed version of an application
Correct answer: The user-specified configuration that the orchestrator continuously tries to achieve and maintain
Kubernetes continuously reconciles the actual cluster state with the desired state declared by the user in manifests.
Question 7: Which field controls the order in which containers within a StatefulSet are started and stopped?
- podManagementPolicy (Correct answer)
- updateStrategy
- ordinals
- terminationGracePeriodSeconds
Correct answer: podManagementPolicy
The `podManagementPolicy` field (OrderedReady or Parallel) controls how StatefulSet Pods are created, updated, and deleted.
What Kubernetes feature allows you to run multiple containers that share the same network namespace within a single Pod?