Kubernetes and Cloud Native Associate (KCNA) Exam-style mock test
KCNA Practice Exams — 6 Full Mock Tests|Practice test
Full explanations
Exam format
Pass line 75%
33 USD One-time · lifetime access
Enroll →
Sample questions
Example1 · Kubernetes Fundamentals
A retail bank is moving its card-fraud scoring engine onto Kubernetes. The platform team explains that the scheduler never places individual containers onto nodes directly; it always works with a wrapper object that can hold one or more containers sharing network and storage. What is this smallest deployable unit called?
・A ReplicaSet
Incorrect. A ReplicaSet maintains a set of identical Pods; it is a controller above Pods, not the unit of scheduling.
・A container image
Incorrect. A container image is the packaged application artifact; it is what runs inside a container, not a scheduling unit.
✓A Pod
Correct. The Pod is the smallest deployable unit in Kubernetes; the scheduler assigns Pods, not bare containers, to nodes.
・A node group
Incorrect. A node group is an infrastructure grouping of worker machines, not a Kubernetes workload unit.
Explanation
Kubernetes schedules Pods. A Pod wraps one or more tightly coupled containers that share an IP address, network namespace, and storage volumes.
Example2 · Container Orchestration
A core-ledger API at a retail bank must be reachable by other Pods inside the cluster through a stable virtual IP, but it must never be exposed outside the cluster. Which Service type fits?
✓ClusterIP
Correct. ClusterIP gives the Service a stable internal virtual IP reachable only from within the cluster — the default and most restrictive exposure.
・NodePort
Incorrect. NodePort opens a port on every node's address, making the Service reachable from outside the cluster network.
・LoadBalancer
Incorrect. LoadBalancer provisions an external load balancer, deliberately exposing the Service publicly.
・ExternalName
Incorrect. ExternalName maps a Service name to an external DNS name; it fronts no internal Pods.
Explanation
Service types form an exposure ladder: ClusterIP (internal) → NodePort (node ports) → LoadBalancer (external LB). Internal-only APIs stay on ClusterIP.
Example3 · Cloud Native Application Delivery
A bank's platform team declares that the Git repository is the single source of truth for cluster configuration, and a software agent inside the cluster continuously pulls the repo and reconciles the live state to match it. What is this delivery approach called?
・ChatOps
Incorrect. ChatOps drives operations through chat commands; Git is not its source of truth.
・Pair deployment
Incorrect. Pair deployment is not an established delivery model; pairing refers to a programming practice.
・Shadow IT
Incorrect. Shadow IT describes unsanctioned systems outside governance — the opposite of this controlled workflow.
✓GitOps
Correct. GitOps means versioned declarative desired state in Git, continuously and automatically reconciled to the cluster by an agent such as Argo CD or Flux.
Explanation
GitOps rests on declarative desired state, versioned in Git, pulled and reconciled automatically — the delivery pattern implemented by Argo CD and Flux.
Example4 · Cloud Native Architecture
A hospital SRE team is writing its observability strategy and lists the three classic telemetry signal types it must collect from the patient-portal services. Which trio is the standard answer?
・Alerts, dashboards, and reports
Incorrect. Alerts, dashboards, and reports are things built on top of telemetry, not the signals themselves.
・Backups, snapshots, and audits
Incorrect. Backups and snapshots belong to data protection, not observability.
・Uptime, latency, and cost
Incorrect. These are example measurements or outcomes, not the three signal categories.
✓Metrics, logs, and traces
Correct. Metrics, logs, and distributed traces are the three pillars of observability.
Explanation
Observability is conventionally built on three signal types — numeric metrics, event logs, and request traces — each answering different questions about system behavior.
Example5 · Kubernetes Fundamentals
A hospital platform team is documenting its new Kubernetes cluster for compliance auditors. The auditors ask where the cluster keeps its configuration data and the desired state of every object, such as Deployments and Services. Which component should the team name?
・The kubelet database maintained locally on each worker node
Incorrect. The kubelet is a node agent; it does not hold the cluster's source-of-truth data store.
・kube-proxy, which persists object state inside iptables rules
Incorrect. kube-proxy programs Service networking rules; it stores no cluster object state.
✓etcd, the consistent key-value store of the control plane
Correct. etcd is the consistent, highly available key-value store that holds all cluster data and desired state.
・The container runtime's image store on the first node
Incorrect. The runtime's image store caches container images, not Kubernetes object definitions.
Explanation
All Kubernetes object definitions and cluster state live in etcd, the control plane's consistent key-value store, accessed exclusively through the kube-apiserver.
Example6 · Kubernetes Fundamentals
A pharmaceutical company must account for every change made to workloads in its clinical-trial cluster. An engineer notes that whether a change comes from kubectl, a CI pipeline, or an internal controller, it always passes through one control plane component that authenticates, validates, and persists it. Which component is this?
✓kube-apiserver
Correct. The kube-apiserver is the single front end of the control plane; every client and controller interacts through it.
・kube-scheduler
Incorrect. The scheduler only assigns Pods to nodes; it is not the API entry point.
・kube-controller-manager
Incorrect. The controller-manager runs reconciliation loops and itself talks to the cluster through the API server.
・etcd
Incorrect. etcd stores the data, but clients never write to it directly; the API server mediates all access.
Explanation
The kube-apiserver exposes the Kubernetes API, performing authentication, authorization, and validation before persisting objects to etcd, which makes it the natural audit point.
Example7 · Kubernetes Fundamentals
An online marketplace runs its shopping-cart service together with a request-logging sidecar in the same Pod. Developers notice the two containers reach each other simply via localhost and present the same IP address to the cluster. Why is this possible?
・The kubelet configures a VPN tunnel between containers in a Pod
Incorrect. No VPN is involved; the containers simply live inside the same network namespace.
✓Each Pod has one network namespace that all of its containers share
Correct. All containers in a Pod share one network namespace, so they share the Pod IP and can talk over localhost.
・Kubernetes merges the two container images into one at deploy time
Incorrect. Images remain separate artifacts; sharing happens at the Pod's runtime namespaces, not at the image level.
・The CNI plugin assigns matching IP addresses to related containers
Incorrect. The CNI plugin assigns one IP per Pod, not coordinated per-container addresses.
Explanation
A Pod is a shared execution environment: its containers share the network namespace (one IP, localhost communication) and can share volumes, which is exactly what makes sidecar patterns work.
Example8 · Kubernetes Fundamentals
Before the catalog API of a fashion e-tailer begins serving, a database schema migration must finish exactly once per Pod startup. The team drafts:
spec:
initContainers:
- name: migrate
image: catalog-migrate:v12
containers:
- name: catalog-api
image: catalog-api:v12
How does the kubelet treat the migrate container?
・It starts both containers at exactly the same time
Incorrect. Regular containers are held back until every init container has completed successfully.
✓It runs migrate to completion before starting catalog-api
Correct. Init containers run sequentially and must each succeed before the Pod's regular containers are started.
・It runs migrate once per cluster rather than per Pod
Incorrect. Init containers execute during every Pod startup; they are per-Pod, not a cluster-wide, one-time action.
・It restarts migrate continuously alongside the main container
Incorrect. An init container runs to completion and exits; it does not keep running next to the app container.
Explanation
Init containers are made for prepare-before-serve work such as migrations or waiting on dependencies: they run in order, each to completion, before the app containers start.
Example9 · Kubernetes Fundamentals
A grocery-delivery app reads a dozen non-sensitive settings — feature toggles, default currency, page size — that differ between staging and production. The team wants them injected as environment variables without baking them into the image and without using a resource meant for credentials. Which object should hold these settings?
✓A ConfigMap
Correct. ConfigMaps store non-confidential key-value configuration and can be injected as environment variables or files.
・A Secret
Incorrect. Secrets are intended for sensitive data such as passwords and tokens, not ordinary settings.
・A ResourceQuota
Incorrect. A ResourceQuota caps aggregate resource consumption in a namespace; it carries no application settings.
・An EndpointSlice
Incorrect. EndpointSlices track the network endpoints backing a Service; they are not a configuration store.
Explanation
ConfigMaps decouple non-sensitive configuration from images, letting the same image run in every environment with different injected settings.
Example10 · Kubernetes Fundamentals
An electronics assembly plant deploys its manufacturing-execution API with this Pod spec:
spec:
initContainers:
- name: schema-migrate
image: registry.plant.example/mes-migrate:v12
containers:
- name: mes-api
image: registry.plant.example/mes-api:v12
What does Kubernetes guarantee about the schema-migrate container?
・It runs continuously beside mes-api for the Pod's lifetime
Incorrect. Long-running helpers beside the app describe a sidecar container, not an init container.
・It starts only after mes-api reports a ready status
Incorrect. The ordering is the opposite: app containers wait for init containers, never the reverse.
・It runs once on every node, independently of this Pod
Incorrect. Per-node placement is DaemonSet behavior; an init container belongs to this one Pod.
✓It runs to completion before the mes-api container starts
Correct. Init containers run sequentially and must each exit successfully before the regular containers of the Pod start.
Explanation
Init containers are designed for setup work such as schema migrations: they run one after another to completion, and only then does the kubelet start the Pod's app containers.
Example11 · Kubernetes Fundamentals
A machine-telemetry service at an automotive plant runs two containers in the same Pod: the main collector and a protocol-translation helper. The developer asks how the helper should address the collector's TCP port. What is the simplest answer?
・Via the Pod's DNS name registered in the cluster DNS service
Incorrect. Individual Pods do not get DNS records by default, and DNS is unnecessary inside a single Pod.
✓Via localhost, since both containers share one network namespace
Correct. Containers in one Pod share the same IP and network namespace, so they reach each other over localhost.
・Via a NodePort opened for traffic between the containers
Incorrect. NodePorts expose Services outside the cluster; they are not used between containers of one Pod.
・Via the node's primary IP address and a host port
Incorrect. Using node IPs couples the Pod to host networking, which is not how co-located containers communicate.
Explanation
A Pod is the unit that owns the network identity: all of its containers share one IP and port space, so intra-Pod communication is simply localhost plus the port number.
Example12 · Kubernetes Fundamentals
A ministry of transport installs cert-manager on its permit-portal cluster, and afterwards this command succeeds:
kubectl get certificates -n permits
Certificate is not a built-in Kubernetes resource type. What made the API server able to store and serve this new kind of object?
・A new admission controller compiled into the API server
Incorrect. Admission controllers intercept requests to resources that already exist; they cannot define new resource types, and they are not added by applying manifests.
✓A CustomResourceDefinition registered during the installation
Correct. CustomResourceDefinitions extend the Kubernetes API with new resource types, which the API server then stores and serves like built-in objects.
・A feature gate enabled on the kubelet of every node
Incorrect. Feature gates toggle built-in functionality; the kubelet plays no role in defining API resource types.
・A plugin added to the kubectl binary on the workstation
Incorrect. kubectl discovers available resource types from the API server at runtime; no client-side plugin can create server-side types.
Explanation
cert-manager ships CustomResourceDefinitions such as Certificate. Once a CRD is applied, the API server treats the new type as a first-class resource that controllers can watch and reconcile.
Example13 · Kubernetes Fundamentals
A national tax agency runs PostgreSQL inside Kubernetes. The team adopts software that watches a database custom resource and automatically performs failover, backup scheduling, and version upgrades the way an experienced administrator would. Which pattern does this software implement?
・The sidecar pattern, extending Pods with helper containers
Incorrect. A sidecar adds a helper container inside each Pod; it does not manage the lifecycle of a whole application from outside.
・The ambassador pattern, proxying connections to remote services
Incorrect. An ambassador container proxies network traffic on behalf of an application; it does not automate operations.
・The init container pattern, preparing Pods before startup
Incorrect. Init containers perform one-time setup before a Pod's app containers start; they do not manage ongoing operations.
✓The Operator pattern, pairing custom resources with a controller
Correct. An Operator encodes human operational knowledge as a custom controller acting on custom resources, automating tasks like failover and upgrades.
Explanation
The Operator pattern combines a CustomResourceDefinition with a purpose-built controller so that day-2 operations — failover, backups, upgrades — are reconciled automatically, like a software DBA.
Example14 · Kubernetes Fundamentals
A video-streaming startup runs its HLS packager together with an uploader in one Pod:
spec:
volumes:
- name: segments
emptyDir: {}
containers:
- name: packager
volumeMounts:
- name: segments
mountPath: /out
- name: uploader
volumeMounts:
- name: segments
mountPath: /in
The uploader instantly sees every segment file the packager writes. What makes this possible?
・Containers in one Pod always share a single root filesystem
Incorrect. Each container keeps its own isolated filesystem; only explicitly mounted volumes are shared.
・The kubelet copies files between containers on a sync interval
Incorrect. The kubelet sets up the mounts once; it does not copy or synchronize files between containers.
✓Both containers mount the same emptyDir volume owned by the Pod
Correct. A Pod-level volume such as emptyDir can be mounted by several containers of the Pod, giving them a shared directory.
・The uploader streams the files from the packager over localhost
Incorrect. localhost covers shared networking inside a Pod, but these containers exchange files through a volume, not sockets.
Explanation
Containers in a Pod have separate filesystems but can share data through Pod volumes. An emptyDir lives as long as the Pod and is a standard way to pass files between an app container and a helper container.
Example15 · Kubernetes Fundamentals
On the self-managed control plane of a game studio, an engineer deletes the Pod kube-apiserver-cp1 with kubectl, yet it reappears within seconds and has no Deployment or ReplicaSet as an owner. What kind of Pod is this?
・A Pod protected by a validating webhook that undoes deletions
Incorrect. Webhooks can reject requests, but the delete here succeeds; the Pod is simply recreated from the node-local manifest.
・A Pod recreated by a hidden controller in the kube-public namespace
Incorrect. kube-public holds no controller that recreates control plane Pods.
・A Pod pinned by a PodDisruptionBudget that blocks all deletions
Incorrect. A PodDisruptionBudget limits voluntary evictions such as drains; it does not resurrect deleted Pods.
✓A static Pod the kubelet runs from a node-local manifest file
Correct. Control plane components are often static Pods: the kubelet runs them from local manifest files and republishes a mirror Pod object, so deleting the mirror changes nothing.
Explanation
Static Pods are defined in a directory on the node (such as /etc/kubernetes/manifests) and managed directly by the kubelet. The API server only shows a read-only mirror Pod, which the kubelet recreates if removed.
▶ Try 10 free questions (graded)