Skip to content

Container Orchestration: KCNA practice questions

Container orchestration is everything Kubernetes does to keep many containers running across many machines: placing them on nodes, restarting them, giving them storage and network access, and controlling who can talk to whom.

By Ibrahim Yesilay · Published · Updated

Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.

What Container Orchestration covers in KCNA

Container orchestration is everything Kubernetes does to keep many containers running across many machines: placing them on nodes, restarting them, giving them storage and network access, and controlling who can talk to whom.

At the bottom of the stack is the container runtime. The kubelet on each node does not run containers itself; it talks to a container runtime through the Container Runtime Interface, a gRPC protocol in which the kubelet is the client and the runtime is the server. Because the CRI is a plugin interface, runtimes can be swapped without recompiling cluster components.

Some workloads are about placement rather than replica count. A DaemonSet ensures that all, or some, nodes run a copy of a Pod: when a node joins the cluster a Pod is added to it, and when a node leaves the Pod is garbage collected, which is why DaemonSets are used for node-level agents such as log collectors, monitoring daemons and cluster storage daemons.

Health checking is what lets the orchestrator heal workloads. A Pod's restartPolicy is Always, OnFailure or Never, with Always as the default. A liveness probe that fails more often than its threshold makes the kubelet restart the container. A readiness probe that fails does not restart anything; instead the Pod's IP is removed from the EndpointSlices of every matching Service, so it stops receiving traffic. A startup probe holds back the liveness and readiness probes until the application has finished starting, and if it fails the container is killed and the restart policy applies. Probes can run a command (exec) or make an httpGet, tcpSocket or grpc check.

Storage separates what an application asks for from what the cluster provides. A PersistentVolume is a piece of storage in the cluster with a lifecycle independent of any Pod. A PersistentVolumeClaim is a user's request for storage of a certain size and access mode. When no existing volume matches, a StorageClass lets the cluster provision one dynamically. ReadWriteOnce means the volume can be mounted read-write by a single node, ReadOnlyMany and ReadWriteMany allow many nodes, and ReadWriteOncePod limits it to a single Pod. With the Retain reclaim policy, deleting the claim leaves the volume in the Released phase with its data intact until an administrator reclaims it by hand.

Network isolation is opt-in. By default a Pod accepts all inbound connections and may open any outbound one. A NetworkPolicy that selects a Pod and lists Ingress in its policyTypes isolates its incoming traffic, and Egress does the same for outgoing traffic; once isolated, only connections allowed by some policy get through, and for a connection between two Pods both the sender's egress and the receiver's ingress must allow it. NetworkPolicies are implemented by the network plugin, so creating one in a cluster whose plugin does not support them has no effect at all.

Key points

  • The kubelet talks to the container runtime over gRPC through the Container Runtime Interface.
  • A DaemonSet runs a copy of a Pod on all (or selected) nodes and adds it to nodes that join.
  • A failed readiness probe removes the Pod from Service endpoints; a failed liveness probe restarts the container.
  • ReadWriteOnce means read-write by a single node; ReadWriteOncePod means a single Pod.
  • NetworkPolicies only take effect when the network plugin implements them.

Three sample questions

86 KCNA questions on Container Orchestration, 86 with explanations. How practice works

Question 1

What is the purpose of a DaemonSet?
  1. A.To run a copy of a pod on all (or some) nodes in the cluster
  2. B.To ensure a specified number of pod replicas are running
  3. C.To run pods that perform batch jobs
  4. D.To manage stateful applications

Correct answer: A

DaemonSets ensure that a pod runs on every node (or selected nodes using node selectors). Common use cases include log collectors, monitoring agents, and storage daemons.

Question 2

Which Container Runtime Interface (CRI) compliant runtime can be used with Kubernetes?
  1. A.containerd
  2. B.CRI-O
  3. C.Docker Engine (via dockershim)
  4. D.Both A and B

Correct answer: D

Both containerd and CRI-O implement the Container Runtime Interface and can be used with Kubernetes. Docker Engine requires dockershim (deprecated) or containerd.

Question 3

What type of storage is best suited for a StatefulSet running a database?
  1. A.emptyDir
  2. B.PersistentVolume with ReadWriteOnce access mode
  3. C.hostPath
  4. D.ConfigMap

Correct answer: B

StatefulSets require persistent storage that survives pod rescheduling. PersistentVolumes with ReadWriteOnce provide dedicated storage per pod. emptyDir is ephemeral and deleted when pods are removed.

Practice this topic

Focus mode keeps every question on Container Orchestration until you leave it. 10 free guest answers, then a free account; no credit card.

Or open KCNA practice across all topics.

Sources

The explanation above was checked against these official documents.