SaveMyCert
Log in
5 of 5 free questions left today·for 30 a day
KCNA practice

KCNA sample questions — 25 answered and explained

25 KCNA sample questions written to the official Kubernetes and Cloud Native Associate (KCNA) exam guide, grouped by exam domain and weighted like the real exam. Each shows the correct answer, why every other option is wrong, and the lesson that teaches it. None of them repeat the examples on the other KCNA practice pages.

On this page
25
answers included
Full bank
385
on the practice page
Domains
4
weighted like the exam
Free, no account
5/day
a free account allows 30 a day

Domain 1: Kubernetes Fundamentals

44% of the KCNA exam, so 11 of the 25 questions on this page.

Question 1Kubernetes Fundamentals

What is a ReplicaSet responsible for?

Choose one.

  • a
    Giving a group of Pods one stable virtual IP and DNS name

    A stable virtual IP and DNS name come from a Service, which selects Pods by label.

  • b
    Keeping a set number of identical Pods running at all times Correct

    A ReplicaSet counts the Pods matching its selector and creates or deletes Pods from its template until the count matches replicas.

  • c
    Running exactly one copy of a Pod on each node in the cluster

    One Pod per node is a DaemonSet. A ReplicaSet runs a fixed count with no regard to node coverage.

  • d
    Rolling Pods to a new image version and rolling back on failure

    Rolling updates and rollbacks are added by a Deployment, which manages ReplicaSets. A ReplicaSet has no notion of versions.

The concept

A ReplicaSet maintains a stable number of identical Pod replicas, creating Pods from its template when too few match its selector and deleting extras when too many do.

Why that’s the answer

The ReplicaSet's only job is the replica count, which gives self-healing and horizontal scale. Each distractor is a neighbouring object's job: a Service gives the stable address, a DaemonSet places one Pod per node, and a Deployment adds versioned rollouts and rollbacks on top of ReplicaSets.

How to reason it out
  1. Identify the one thing a ReplicaSet tracks: the count of matching Pods.
  2. Map each other option to its owning object (Service, DaemonSet, Deployment).
  3. Choose the replica-count option.

Exam tip: ReplicaSet = keep N identical Pods; Deployment = versions; DaemonSet = one per node; Service = stable address.

Kubernetes Core Concepts: Architecture, Pods, Deployments, and Services — the lesson that teaches this.

Question 2Kubernetes Fundamentals

A team's manifests create ReplicaSets directly. A reviewer asks them to create Deployments instead. What does the team gain?

Choose one.

  • a
    A Deployment can run more replicas than a ReplicaSet is allowed to

    There is no lower replica limit on a ReplicaSet; a Deployment's replicas are in fact run by the ReplicaSets it manages.

  • b
    Rolling updates and rollbacks, with ReplicaSets handled for you Correct

    A Deployment creates a new ReplicaSet when the Pod template changes, shifts replicas across gradually, and keeps old ReplicaSets as revisions for rollback.

  • c
    Pods that run directly under the Deployment without a ReplicaSet

    A Deployment always works through ReplicaSets; the Pods are owned by the ReplicaSet, which is owned by the Deployment.

  • d
    A stable virtual IP and DNS name in front of the replicated Pods

    A stable address comes from a Service, whether the Pods come from a Deployment or a ReplicaSet.

The concept

A Deployment manages ReplicaSets and adds declarative rolling updates, revision history and rollbacks. A ReplicaSet alone only keeps a replica count.

Why that’s the answer

Changing a ReplicaSet's Pod template does not replace its running Pods, so a team managing ReplicaSets directly has to orchestrate version changes by hand. A Deployment does it for them: a new ReplicaSet per template change, a gradual scale-up/scale-down, and old ReplicaSets kept so `kubectl rollout undo` can return to a previous revision. Neither object provides a stable IP (that is a Service), and a Deployment still uses ReplicaSets underneath.

How to reason it out
  1. Recall what a ReplicaSet alone provides: a replica count.
  2. Recall what a Deployment adds: versioned rollouts and rollbacks.
  3. Reject options that belong to a Service or misstate the ownership chain.

Exam tip: Deployment -> ReplicaSet -> Pods; the Deployment layer exists for rollouts and rollbacks.

Kubernetes Core Concepts: Architecture, Pods, Deployments, and Services — the lesson that teaches this.

Question 3Kubernetes Fundamentals

A ReplicaSet is configured with replicas: 3. An engineer runs kubectl delete pod on one of its Pods. What happens next?

Choose one.

  • a
    The app runs on 2 Pods until someone re-applies the ReplicaSet manifest

    No re-apply is needed: the ReplicaSet controller reconciles continuously, not only when its manifest is applied.

  • b
    The same Pod is restarted on its node, keeping its old name and IP

    Deleted Pods are not resurrected. The replacement is a new Pod object with a new name and, usually, a new IP, possibly on another node.

  • c
    The API server rejects the deletion since a controller owns the Pod

    Owned Pods can be deleted normally; the owner simply notices and replaces them.

  • d
    The controller sees 2 matching Pods and creates a new one to reach 3 Correct

    The ReplicaSet controller observes two Pods matching its selector where three are desired and creates a replacement from its Pod template.

The concept

A ReplicaSet's controller continuously compares the number of Pods matching its selector with the desired replica count and creates or deletes Pods to close the gap.

Why that’s the answer

Deleting a managed Pod is allowed, and it simply creates a gap between desired state (3) and observed state (2). The ReplicaSet controller closes that gap within moments by creating a brand-new Pod. The two tempting wrong ideas are that the old Pod comes back (Pods are ephemeral; the replacement has a new name and IP) and that someone must re-apply the manifest (reconciliation never stops).

How to reason it out
  1. Desired state is still replicas: 3 in the stored ReplicaSet.
  2. Observed state drops to 2 matching Pods.
  3. The controller creates a new Pod from the template - a new object, not the old one.

Exam tip: Deleting a Pod owned by a ReplicaSet just triggers a replacement; delete the owner to remove the Pods for good.

Kubernetes Core Concepts: Architecture, Pods, Deployments, and Services — the lesson that teaches this.

Question 4Kubernetes Fundamentals

The Pods backing an application are frequently replaced, and each new Pod receives a different IP address. Which Kubernetes object gives clients one stable address and DNS name to reach the application?

Choose one.

  • a
    A ConfigMap

    A ConfigMap stores non-secret configuration data for Pods to consume. It has nothing to do with network addressing or traffic routing.

  • b
    A Service Correct

    A Service provides a stable virtual IP and DNS name in front of a set of Pods selected by labels, so clients are unaffected when individual Pods come and go.

  • c
    A ReplicaSet

    A ReplicaSet keeps the right number of Pods running, but it provides no networking - the replacement Pods it creates still get new IPs.

  • d
    A namespace

    A namespace groups and scopes resources. It does not provide any address or routing for reaching Pods.

The concept

Pod IPs are ephemeral by design. The Service abstraction decouples clients from Pod churn by exposing a stable virtual IP (ClusterIP) and DNS name that always routes to the current healthy Pods.

Why that’s the answer

A Service uses a label selector to track its backend Pods continuously; kube-proxy translates traffic hitting the Service IP into connections to whichever Pods currently match. A ReplicaSet is the tempting distractor because it also deals with Pod churn - but it solves the availability half (keeping Pods running), not the addressing half (reaching them consistently).

How to reason it out
  1. You create a Service whose selector matches the application's Pod labels.
  2. Kubernetes assigns it a stable ClusterIP and a DNS name.
  3. As Pods are replaced, the Service's endpoints update automatically and clients keep using the same address.

Exam tip: Services give a stable virtual IP and DNS name over an ever-changing set of Pods.

Kubernetes Core Concepts: Architecture, Pods, Deployments, and Services — the lesson that teaches this.

Question 5Kubernetes Fundamentals

An engineer creates a Service for a web application. How does the Service decide which Pods receive the traffic it forwards?

Choose one.

  • a
    It sends to ready Pods whose annotations match the Service's selector

    Annotations are non-identifying metadata and cannot be used in selectors. Selectors match labels.

  • b
    It sends to running Pods whose names are listed in the Service manifest

    A Service spec has no list of Pod names. Pod names change on every replacement, which is exactly what the selector avoids.

  • c
    It sends to ready Pods whose labels match the Service's selector Correct

    The Service's label selector defines its backends; Pods that match and pass readiness are tracked in EndpointSlices, which kube-proxy uses to route traffic.

  • d
    It sends to ready Pods in its namespace that expose the Service's port

    Exposing a matching port is not enough. Membership is decided by the label selector; targetPort only says where to send traffic on the selected Pods.

The concept

A Service selects its backend Pods with a label selector. Matching, ready Pods are recorded in EndpointSlices, and kube-proxy routes the Service's traffic to them.

Why that’s the answer

Labels are the glue of the Kubernetes object model: a Service's selector is a label query, so any Pod - including replacements with new names and IPs - that carries the right labels and is ready joins the backend set automatically. Annotations look similar but are deliberately not selectable. Pod names are never listed, and sharing a namespace or a port does not make a Pod a backend.

How to reason it out
  1. Recall that Pods are replaced with new names and IPs.
  2. A Service therefore needs a membership rule that survives churn: a label selector.
  3. Readiness further filters which matching Pods get traffic.

Exam tip: Services find Pods by labels (plus readiness) - never by name, annotation or port alone.

Kubernetes Core Concepts: Architecture, Pods, Deployments, and Services — the lesson that teaches this.

Question 6Kubernetes Fundamentals

Two teams share one cluster. Each wants a Deployment named api, its own access rules and its own resource quota. What should separate the two teams' resources?

Choose one.

  • a
    A team label added to each team object

    Labels help select objects but do not scope names: two Deployments named api cannot coexist in one namespace, whatever their labels. RBAC and quotas are also scoped per namespace, not per label.

  • b
    A dedicated namespace created for each team Correct

    Names only need to be unique within a namespace, and RBAC Roles/RoleBindings and ResourceQuotas are namespaced, so one namespace per team meets all three needs.

  • c
    A team annotation added to each of the team's objects

    Annotations are non-identifying metadata. They neither scope names nor drive access control or quotas.

  • d
    A tainted node pool dedicated to each team's workloads

    Taints control which nodes Pods may run on. They separate compute, not API object names, access rules or quotas.

The concept

Namespaces divide one cluster into virtual slices: object names must be unique only within a namespace, and access control (Roles, RoleBindings) and ResourceQuotas apply per namespace.

Why that’s the answer

Three requirements point the same way. Duplicate names (two Deployments called api) are only possible in different namespaces. Namespaced RBAC lets each team be granted rights to its own namespace only, and a ResourceQuota caps one namespace's consumption. Labels and annotations are metadata on objects, and tainted node pools isolate where Pods run; none of them scopes names, permissions or quotas.

How to reason it out
  1. Spot the name collision: two Deployments called api.
  2. Recall that names are unique per namespace.
  3. Check the other needs: RBAC and quotas are also namespace-scoped.

Exam tip: Use namespaces to separate teams in one cluster: they scope names, permissions and quotas.

Kubernetes Core Concepts: Architecture, Pods, Deployments, and Services — the lesson that teaches this.

Question 7Kubernetes Fundamentals

The kube-scheduler process crashes and is down for ten minutes. What happens in the cluster during that time?

Choose one.

  • a
    Running Pods are evicted, and new Pods are queued until it returns

    The scheduler plays no part in keeping running Pods on their nodes; nothing is evicted because it is down.

  • b
    Kubelets pick nodes for new Pods until the scheduler comes back

    Kubelets only run Pods already bound to their node; they do not take over placement decisions.

  • c
    New Pods remain Pending with no node; running Pods are unaffected Correct

    Without the scheduler no Pod gets a node binding, so new Pods sit in Pending. Running Pods are managed by kubelets and keep running.

  • d
    The API server refuses new Pod creation requests until it is back

    The API server still accepts and stores new Pods; they simply wait unscheduled until the scheduler returns.

The concept

The kube-scheduler only binds unscheduled Pods to nodes. While it is down, new Pods are accepted but wait in Pending; already-scheduled Pods are unaffected.

Why that’s the answer

Two facts combine here. First, creation and scheduling are separate steps: the API server accepts and stores a new Pod, and the scheduler later binds it to a node - so creation still succeeds. Second, running Pods are kept alive by the kubelet on their node, which needs no scheduler. Put together, the only effect is a backlog of Pending Pods that the scheduler places once it restarts.

How to reason it out
  1. The API server still accepts and stores new Pod objects.
  2. Without the scheduler, no node binding is made: the Pods stay Pending.
  3. Running Pods depend on their kubelet, not on the scheduler.

Exam tip: Scheduler down = new Pods Pending; nothing already running is affected.

Kubernetes Core Concepts: Architecture, Pods, Deployments, and Services — the lesson that teaches this.

Question 8Kubernetes Fundamentals

The kube-apiserver is unreachable for a few minutes. Which statement describes the cluster during the outage?

Choose one.

  • a
    Existing Pods keep running, and kubectl requests queue and replay when it returns

    The API server is the only endpoint kubectl talks to; while it is unreachable requests fail with a connection error. Nothing queues them for later replay.

  • b
    Existing Pods keep running, and kubectl fails and rollouts stall until it returns Correct

    Running workloads continue on their nodes, but every read or change goes through the API server, so kubectl requests fail and controllers cannot act, leaving any rollout stalled until it is back.

  • c
    Existing Pods keep running, and kubectl falls back to reading etcd directly

    kubectl only talks to the API server. There is no fallback to etcd, which only the API server reads and writes.

  • d
    Existing Pods keep running, and kube-proxy answers kubectl reads until it returns

    kube-proxy programs Service rules on nodes; it cannot serve the Kubernetes API.

The concept

The kube-apiserver is the only way to read or change cluster state. Running containers, however, are kept alive on each node by the kubelet and container runtime.

Why that’s the answer

Two facts decide this item. The data plane keeps going: kubelets keep existing containers running even when they cannot report status. The control path stops: kubectl, controllers and the scheduler all need the API server, and nothing queues requests, falls back to etcd or lets another component answer. So workloads continue, kubectl requests fail and an in-progress rollout stalls (controllers cannot act) until the API server returns.

How to reason it out
  1. Separate running workloads (node side) from reading and changing state (API side).
  2. Running containers survive because the kubelet and runtime keep them going.
  3. Every client, kubectl and controllers included, needs the API server; there is no queue, etcd fallback or substitute endpoint.
  4. So rollouts stall and kubectl fails until it returns.

Exam tip: An API server outage freezes changes, not running workloads.

Kubernetes Core Concepts: Architecture, Pods, Deployments, and Services — the lesson that teaches this.

Question 9Kubernetes Fundamentals

An administrator runs kubectl logs for a container in a Pod that is running on worker node node-3. To which component does kubectl send this request?

Choose one.

  • a
    The kubelet agent running on worker node node-3

    Tempting because the logs physically live on node-3, but kubectl has no direct path to a kubelet. The kube-apiserver contacts the kubelet on the client's behalf.

  • b
    The etcd datastore that holds the cluster state

    etcd stores API objects, not container logs, and only kube-apiserver talks to etcd. kubectl never connects to it.

  • c
    The kube-apiserver in the cluster's control plane Correct

    Correct. kubectl is a client of the Kubernetes API, so even node-level commands such as logs and exec go to kube-apiserver, which authorizes them and then relays to the kubelet on node-3.

  • d
    The container runtime running on worker node node-3

    The container runtime is driven by the kubelet on the node, never directly by a client tool such as kubectl.

The concept

kubectl is a thin client of the Kubernetes API: every command, including logs and exec, becomes an HTTPS request to kube-apiserver.

Why that’s the answer

kube-apiserver is the cluster's single entry point. For kubectl logs it authenticates the caller, checks RBAC (the pods/log subresource) and then fetches the log stream from the kubelet on the target node, proxying it back. The kubelet and the runtime are where the logs come from, which makes them tempting, but neither is reachable from kubectl directly, and etcd holds only API objects.

How to reason it out
  1. Recall that kubectl only knows the API server address from its kubeconfig context.
  2. Note that a node-level command still needs authentication and RBAC, which only the API server performs.
  3. The API server then relays to the kubelet on the node, which reads the container's logs from the runtime.

Exam tip: Every kubectl command goes to kube-apiserver; node-level commands like logs and exec are relayed to the kubelet by the API server.

Kubernetes Administration: kubectl, RBAC, Namespaces, and Resource Quotas — the lesson that teaches this.

Question 10Kubernetes Fundamentals

A developer's workstation has a file at ~/.kube/config that kubectl reads on every command. What does this file store?

Choose one.

  • a
    The desired state of the Deployments and Pods running in each cluster

    Desired state lives in manifests applied to the cluster and is persisted in etcd, not in the client-side kubeconfig file.

  • b
    The Roles and RoleBindings that decide what each user may do in a cluster

    RBAC objects are API resources stored inside the cluster. kubeconfig carries credentials, but the permissions attached to them are evaluated by the API server.

  • c
    The API server addresses, user credentials and contexts that kubectl uses Correct

    Correct. kubeconfig lists clusters (API server URLs and CA data), users (credentials) and contexts that pair them, which is how kubectl knows where to connect and as whom.

  • d
    The default CPU and memory limits applied to containers created by kubectl

    Per-container defaults come from a LimitRange object in a namespace, not from anything on the client.

The concept

A kubeconfig file is kubectl's connection profile: clusters, users and the contexts that combine them.

Why that’s the answer

kubectl needs two things before it can send a request: where the API server is and which credentials to present. kubeconfig supplies both, plus named contexts that let one workstation switch between clusters. Everything else in the options - desired state, RBAC grants and default limits - lives inside the cluster as API objects.

How to reason it out
  1. Ask whether the item is client-side connection information or cluster-side state.
  2. Connection information (server URL, CA data, credentials, context) belongs in kubeconfig.
  3. Workloads, RBAC objects and LimitRanges are API objects stored in the cluster.

Exam tip: kubeconfig tells kubectl where to connect and as whom; everything about what runs or who is allowed lives in the cluster.

Kubernetes Administration: kubectl, RBAC, Namespaces, and Resource Quotas — the lesson that teaches this.

Question 11Kubernetes Fundamentals

A kubeconfig file has clusters, users and contexts sections. What does a single entry in the contexts section define?

Choose one.

  • a
    A named pairing of a cluster, a user and an optional default namespace Correct

    Correct. A context ties one cluster entry to one user entry and can set a default namespace; kubectl config use-context switches between them.

  • b
    A named API server address together with the CA data used to verify it

    That is a clusters entry. A context refers to a cluster by name rather than defining its address.

  • c
    A named set of credentials such as a client certificate or bearer token

    That is a users entry. A context references a user entry by name rather than holding credentials itself.

  • d
    A named grant that links a user to a Role inside one particular namespace

    That describes a RoleBinding, an RBAC object stored in the cluster, not anything in a kubeconfig file.

The concept

kubeconfig separates clusters (where), users (who) and contexts (which cluster as which user, in which default namespace).

Why that’s the answer

A context is a pointer pair plus an optional namespace: cluster X, user Y, namespace Z. The near-twin options describe the other two kubeconfig sections, which a context references by name, and the RoleBinding option mixes up client configuration with in-cluster RBAC.

How to reason it out
  1. List the three kubeconfig sections: clusters, users, contexts.
  2. Clusters hold server addresses and CA data; users hold credentials.
  3. A context names one of each and may add a default namespace.

Exam tip: A context = cluster + user (+ default namespace); switch it with kubectl config use-context.

Kubernetes Administration: kubectl, RBAC, Namespaces, and Resource Quotas — the lesson that teaches this.

Domain 2: Container Orchestration

28% of the KCNA exam, so 7 of the 25 questions on this page.

Question 12Container Orchestration

Which job does kube-proxy perform on every node of a cluster?

Choose one.

  • a
    Programs iptables, IPVS or nftables rules that send Service traffic to Pods Correct

    kube-proxy watches Services and EndpointSlices and programs kernel rules so connections to a Service's virtual IP reach one of its ready Pods.

  • b
    Gives each new Pod an IP address from the node's Pod range and sets its routes

    Pod IP assignment and routing are the CNI plugin's job, invoked when the Pod sandbox is created.

  • c
    Answers DNS queries for Service names and returns their cluster IP addresses

    Name resolution is done by CoreDNS. kube-proxy works with addresses after a name has already been resolved.

  • d
    Applies Ingress host and path rules to HTTP requests arriving at the node

    Ingress rules are applied by an Ingress controller. kube-proxy works at layer 4 on Service virtual IPs and does not inspect HTTP.

The concept

kube-proxy is the per-node agent that implements Services by programming the kernel's packet-handling rules.

Why that’s the answer

kube-proxy turns a Service's virtual IP into real Pod destinations: it watches the API server for Services and EndpointSlices and programs iptables (the default on Linux), IPVS or nftables rules, and the kernel then forwards matching connections to a ready Pod. The distractors are the jobs of its neighbours: the CNI plugin assigns Pod IPs, CoreDNS resolves names and an Ingress controller applies HTTP rules.

How to reason it out
  1. Recall that Service virtual IPs exist only as rules on each node.
  2. Identify kube-proxy as the agent that programs those rules.
  3. Assign the other jobs to their owners: CNI plugin, CoreDNS, Ingress controller.

Exam tip: kube-proxy makes Service IPs work; it does not assign Pod IPs, resolve names or route HTTP.

Kubernetes Networking: Services, kube-proxy, CNI, DNS, and Ingress — the lesson that teaches this.

Question 13Container Orchestration

Which cluster add-on provides DNS-based service discovery inside a Kubernetes cluster?

Choose one.

  • a
    kube-proxy

    kube-proxy handles traffic forwarding for Services, not name resolution.

  • b
    etcd

    etcd is the cluster's key-value store for control-plane state; it does not answer DNS queries.

  • c
    kubelet

    kubelet manages Pod lifecycle on a node; it plays no role in cluster DNS resolution.

  • d
    CoreDNS Correct

    CoreDNS is the default in-cluster DNS server that resolves Service and Pod names to their IP addresses.

The concept

Service discovery in Kubernetes is implemented through an in-cluster DNS server.

Why that’s the answer

CoreDNS runs as a cluster add-on, watching Services and Pods so that names like a Service's cluster.local address resolve to the correct virtual or Pod IP.

How to reason it out
  1. Recall that Kubernetes needs a name-to-IP resolution mechanism for Services and Pods.
  2. Identify CoreDNS as the standard, pluggable DNS server used for this purpose.
  3. Rule out etcd, kubelet, and kube-proxy, which serve unrelated functions.

Exam tip: CoreDNS is the cluster's default DNS server, powering Service name resolution.

Kubernetes Networking: Services, kube-proxy, CNI, DNS, and Ingress — the lesson that teaches this.

Question 14Container Orchestration

A Pod in the namespace web must call a Service named api that runs in the namespace shop. The cluster uses the default cluster domain. Which DNS name resolves to that Service?

Choose one.

  • a
    api.shop.pod.cluster.local

    Service records live under the svc label; the pod label is used for Pod records, so this name does not resolve to the Service.

  • b
    shop.api.svc.cluster.local

    The order is reversed: the Service name comes first, then its namespace.

  • c
    api.shop.svc.cluster.local Correct

    Service FQDNs follow <service>.<namespace>.svc.<cluster-domain>, so api in shop is api.shop.svc.cluster.local.

  • d
    api.web.svc.cluster.local

    This names a Service called api in the caller's own namespace, web, not the one in shop.

The concept

CoreDNS publishes every Service at <service>.<namespace>.svc.cluster.local; the short name api resolves only within the Service's own namespace.

Why that’s the answer

Because the caller is in a different namespace, the short name api would be searched in web first and miss. The fully qualified name puts the Service name, then its namespace, then svc and the cluster domain: api.shop.svc.cluster.local. The distractors swap one part each: the pod label instead of svc, the order of name and namespace, or the caller's namespace.

How to reason it out
  1. Note that caller and Service are in different namespaces.
  2. Recall the pattern <service>.<namespace>.svc.cluster.local.
  3. Fill it in: api, shop, svc, cluster.local.
  4. Check each distractor for the one swapped component.

Exam tip: Cross-namespace: service.namespace.svc.cluster.local, Service name first.

Kubernetes Networking: Services, kube-proxy, CNI, DNS, and Ingress — the lesson that teaches this.

Question 15Container Orchestration

A team applies an Ingress that routes shop.example.com to a ClusterIP Service. The Service answers from inside the cluster, but the Ingress shows no address and requests from outside reach nothing. What is the most likely missing piece?

Choose one.

  • a
    A running Ingress controller, such as Traefik, that watches Ingress objects Correct

    An Ingress is only routing configuration. A controller must watch it and run the proxy that receives external traffic; with none installed the Ingress gets no address and nothing routes.

  • b
    A NodePort Service to replace the ClusterIP Service that the Ingress points to

    Ingress backends are ordinarily ClusterIP Services. Changing the Service type does not give the Ingress an address.

  • c
    A NetworkPolicy that allows traffic from outside the cluster into the namespace

    With no policy selecting the Pods, traffic is already allowed. Nothing is blocked; there is simply no component serving the Ingress.

  • d
    A CoreDNS record that maps shop.example.com to the Service's cluster IP address

    CoreDNS serves in-cluster names. External clients resolve shop.example.com through public DNS, and a cluster IP is not reachable from outside anyway.

The concept

An Ingress object holds layer 7 routing rules but does nothing on its own; an Ingress controller (Traefik, HAProxy Ingress, a cloud provider's controller) must run to implement it.

Why that’s the answer

The symptoms show the backend Service is healthy and the Ingress has no address, which is what an Ingress looks like when no controller is watching it. Installing a controller gives the Ingress an entry point and makes its host rules live. Switching the backend to NodePort, adding a NetworkPolicy in a default-allow cluster, or adding an in-cluster DNS record changes nothing about who serves the Ingress.

How to reason it out
  1. Note the Service works internally, so the backend is fine.
  2. Note the Ingress has no address: nothing has picked it up.
  3. Recall that Ingress objects need a controller to take effect.
  4. Reject fixes that target the Service type, policy or in-cluster DNS.

Exam tip: No Ingress controller, no Ingress: the object is only configuration.

Kubernetes Networking: Services, kube-proxy, CNI, DNS, and Ingress — the lesson that teaches this.

Question 16Container Orchestration

Which of these open source projects is installed into a Kubernetes cluster to provide Pod networking through the Container Network Interface?

Choose one.

  • a
    CoreDNS

    CoreDNS is the cluster DNS server. It runs as Pods that depend on Pod networking already being in place.

  • b
    Envoy

    Envoy is a layer 7 proxy used by service meshes and gateways, not a CNI plugin that assigns Pod IPs.

  • c
    containerd

    containerd is a container runtime. It invokes the configured CNI plugin when creating a Pod sandbox but does not implement Pod networking itself.

  • d
    Calico Correct

    Calico is a widely used CNI plugin: it assigns Pod IPs, routes between nodes and enforces NetworkPolicy.

The concept

CNI plugins such as Calico, Cilium and Flannel implement the Kubernetes Pod network.

Why that’s the answer

Calico is a CNI plugin. The other three are real cloud native projects that sit next to networking: CoreDNS resolves names, Envoy proxies application traffic and containerd runs containers and calls the CNI plugin. A candidate who knows only that they are 'networking-ish' could pick any of them; recognising the plugin names is what the item tests.

How to reason it out
  1. Recall what a CNI plugin does: Pod IPs and Pod-to-Pod routing.
  2. Recall the common plugins: Calico, Cilium, Flannel.
  3. Place the others: DNS server, proxy, container runtime.

Exam tip: Calico, Cilium and Flannel are CNI plugins; CoreDNS, Envoy and containerd are not.

Kubernetes Networking: Services, kube-proxy, CNI, DNS, and Ingress — the lesson that teaches this.

Question 17Container Orchestration

At which network layer does Kubernetes Ingress make its routing decisions?

Choose one.

  • a
    Layer 4, choosing a backend by TCP or UDP port number

    Port-based layer 4 forwarding is what a Service and kube-proxy do. Ingress looks inside the HTTP request.

  • b
    Layer 2, choosing a backend by MAC address on the node

    Nothing in Ingress operates on MAC addresses; that is link-layer switching below anything Kubernetes Services or Ingress handle.

  • c
    Layer 3, choosing a backend by destination IP address

    Routing by IP address alone cannot tell two hostnames on the same address apart, which is exactly what Ingress rules do.

  • d
    Layer 7, choosing a backend by HTTP host and URL path Correct

    Ingress rules match the HTTP Host header and URL path and can terminate TLS, so one entry point can front many Services.

The concept

Ingress is a layer 7 API object: its rules map HTTP hostnames and URL paths to Services, which lets one external entry point serve many applications.

Why that’s the answer

Services and kube-proxy work at layer 4 with addresses and ports. Ingress adds layer 7 routing on top: shop.example.com and blog.example.com, or /api and /static, can share one entry point and go to different Services, with optional TLS termination. The Gateway API is the newer, more expressive successor for the same job.

How to reason it out
  1. Recall what Ingress rules contain: hosts and paths.
  2. Map hosts and paths to the HTTP layer, layer 7.
  3. Contrast with Services, which work at layer 4.

Exam tip: Ingress routes by HTTP host and path: layer 7. Services balance by address and port: layer 4.

Kubernetes Networking: Services, kube-proxy, CNI, DNS, and Ingress — the lesson that teaches this.

Question 18Container Orchestration

A cluster uses Flannel as its network plugin. An engineer applies a NetworkPolicy meant to block all ingress to the payments Pods, yet other Pods can still connect to them. What explains this?

Choose one.

  • a
    Flannel applies new policies when the payments Pods are next restarted

    Policies take effect on running Pods with a plugin that enforces them; a restart is not the trigger, and Flannel would not enforce the policy afterwards either.

  • b
    NetworkPolicy is enforced by kube-proxy, which skips direct Pod-to-Pod traffic

    kube-proxy does not enforce NetworkPolicy at all; enforcement is done by the CNI plugin.

  • c
    NetworkPolicy rules take effect once a matching Ingress resource is created

    Ingress is an unrelated layer 7 routing object; NetworkPolicy ingress rules concern traffic into Pods and need no Ingress resource.

  • d
    Flannel provides Pod connectivity but does not enforce NetworkPolicy rules Correct

    Flannel focuses on connectivity. The API server accepts the policy, but nothing on the nodes enforces it, so traffic keeps flowing.

The concept

NetworkPolicy is an API object; whether it is enforced depends on the CNI plugin. Calico and Cilium enforce it, while plain Flannel does not.

Why that’s the answer

The API server stores any valid NetworkPolicy, so applying one succeeds even when nothing will enforce it. Enforcement happens in the network plugin, and Flannel only provides connectivity, so the policy has no effect until a policy-capable plugin (Calico, Cilium, or Canal, which pairs Flannel with Calico) is used. kube-proxy and Ingress play no part in NetworkPolicy, and a restart does not change which plugin is running.

How to reason it out
  1. Note the policy was accepted but has no effect.
  2. Recall that NetworkPolicy is enforced by the CNI plugin, not by Kubernetes itself.
  3. Recall that Flannel does not implement NetworkPolicy.
  4. Reject options that blame kube-proxy, Ingress or Pod restarts.

Exam tip: An accepted NetworkPolicy is not an enforced one: the CNI plugin must support it.

Kubernetes Networking: Services, kube-proxy, CNI, DNS, and Ingress — the lesson that teaches this.

Domain 3: Cloud Native Application Delivery

16% of the KCNA exam, so 4 of the 25 questions on this page.

Question 19Cloud Native Application Delivery

A cluster is managed by a GitOps controller with automated sync and self-healing enabled. An administrator uses kubectl to raise a running Deployment's replica count from 3 to 6. What happens next?

Choose one.

  • a
    The controller flags the Deployment as out of sync and sets replicas back to 3 Correct

    Correct. The controller continuously compares live objects with Git. The hand edit shows as drift, and with self-healing on, the next reconciliation reapplies the replica count Git declares.

  • b
    The controller commits the new replica count to Git so the repository matches

    GitOps controllers reconcile the cluster toward Git, not the other way round; they do not write live changes back into the repository.

  • c
    The edit stays in place until the next CI pipeline run applies the manifests again

    Waiting for the next pipeline run is how drift behaves in the push model. A GitOps controller reconciles continuously and does not depend on CI runs.

  • d
    The API server rejects the edit because the Deployment is owned by the controller

    The API server accepts the edit if the user has RBAC permission; being managed by a GitOps tool does not lock an object. The controller corrects it afterwards.

The concept

Continuous reconciliation makes GitOps self-healing: any live change that differs from Git is drift, and the controller restores the declared state.

Why that’s the answer

The controller keeps comparing the cluster with what Git declares. A kubectl edit changes live state but not Git, so the Deployment shows as out of sync and self-healing reapplies replicas: 3. Nothing is written back to Git, nothing waits for a CI run, and the API server does not block the edit; it simply does not last.

How to reason it out
  1. Note that the change was made outside Git.
  2. Recall that the controller treats Git as authoritative and compares it with live state continuously.
  3. Apply self-healing: the drift is reverted to the Git value.
  4. Reject options that update Git from the cluster or rely on a pipeline.

Exam tip: Change the cluster by hand and a self-healing GitOps controller changes it back; change Git instead.

Cloud Native Application Delivery: GitOps, Helm, and Deployment Strategies — the lesson that teaches this.

Question 20Cloud Native Application Delivery

A Flux-managed cluster is running a bad image tag that was merged into the configuration repository an hour ago. The team needs a rollback that lasts and appears in the audit history. What should they do?

Choose one.

  • a
    Run kubectl rollout undo on the affected Deployment

    The undo restores the previous ReplicaSet, but Git still declares the bad tag, so Flux sees drift and reapplies it on its next reconciliation. It also leaves no record in Git.

  • b
    Revert the merge commit and let the controller reconcile Correct

    Correct. In GitOps a rollback is a change to Git like any other: reverting the commit restores the previous desired state, Flux applies it, and the revert is recorded in the history.

  • c
    Run helm rollback on the release the controller installed

    Flux manages Helm releases from HelmRelease objects in Git. A manual helm rollback changes the live release only, and Flux upgrades it back to what Git declares.

  • d
    Suspend the controller and edit the image with kubectl set

    Suspending stops reconciliation, so the edit holds for now, but Git still declares the bad tag, the change is not audited, and it returns as soon as sync resumes.

The concept

In GitOps, a rollback is a Git change (usually a revert); the controller then reconciles the cluster back to the earlier state.

Why that’s the answer

Because Git is the source of truth, any rollback made only in the cluster is drift: kubectl rollout undo and helm rollback both get overwritten when Flux reconciles, and suspending Flux only delays that. Reverting the commit changes the desired state itself, so the rollback lasts and the Git history records who did it and when.

How to reason it out
  1. Identify the two requirements: it must last, and it must be auditable.
  2. Recall that the controller reapplies whatever Git declares.
  3. Eliminate rollbacks made only in the cluster, which become drift.
  4. Choose the Git revert, which changes the desired state.

Exam tip: In GitOps you roll back in Git, not in the cluster.

Cloud Native Application Delivery: GitOps, Helm, and Deployment Strategies — the lesson that teaches this.

Question 21Cloud Native Application Delivery

Which CNCF graduated project provides a Kubernetes-native continuous delivery tool with a web UI and CLI that continuously syncs cluster state from a Git repository?

Choose one.

  • a
    Tekton

    Tekton is a CI/CD pipeline framework hosted by the Continuous Delivery Foundation, not the CNCF, and it is not primarily a GitOps sync tool.

  • b
    Argo CD Correct

    Argo CD is a CNCF graduated project that implements the GitOps pull model: it continuously compares a Git repository to the live cluster and can auto-sync or require manual sync through its UI or CLI.

  • c
    Helm

    Helm is a CNCF graduated package manager. It installs and upgrades releases when someone runs it, but it has no controller that continuously syncs the cluster from Git.

  • d
    Kustomize

    Kustomize is a Kubernetes SIG CLI project (built into kubectl) that customizes manifests without templates. It renders YAML on demand; it has no web UI and runs no sync controller.

The concept

Argo CD is one of the two most widely used GitOps continuous delivery tools in the CNCF ecosystem.

Why that’s the answer

Argo CD runs as a controller in or alongside a cluster, watches Git repositories and reconciles the cluster to match, with a web UI showing sync status and drift. Tekton builds pipelines and belongs to the Continuous Delivery Foundation; Helm and Kustomize produce manifests when invoked but do not continuously sync from Git.

How to reason it out
  1. Argo CD is installed into, or targeting, a cluster and pointed at a Git repository.
  2. It compares the repository's manifests to the live cluster state.
  3. It syncs, applying, any differences, either automatically or on manual approval.

Exam tip: Argo CD is a CNCF graduated, Kubernetes-native GitOps continuous delivery tool.

Cloud Native Application Delivery: GitOps, Helm, and Deployment Strategies — the lesson that teaches this.

Question 22Cloud Native Application Delivery

Which CNCF graduated GitOps tool is built from separate source, kustomize and helm controllers that are configured through custom resources?

Choose one.

  • a
    Helm

    Helm is a CNCF graduated package manager run on demand; it is one of the formats this tool can render, not a set of reconciling controllers.

  • b
    Flux Correct

    Correct. Flux is a CNCF graduated GitOps toolkit made of separate controllers (source, kustomize, helm, notification and others), each configured through its own custom resources.

  • c
    Kustomize

    Kustomize is a template-free customization tool used by one of these controllers; it does not reconcile a cluster against Git on its own.

  • d
    Argo CD

    Argo CD is also a graduated GitOps tool, but it centres on one application controller and its Application resource with a built-in web UI, not on separate per-concern controllers.

The concept

Flux is one of the two graduated CNCF GitOps tools, alongside Argo CD, and is built as a toolkit of composable controllers.

Why that’s the answer

Flux is implemented as a family of Kubernetes controllers, each handling a piece of the GitOps loop, such as fetching sources or rendering Kustomize or Helm output, all following Kubernetes' own controller and reconciliation pattern.

How to reason it out
  1. Flux's controllers are installed into the cluster.
  2. The source controller pulls the Git repository.
  3. The kustomize or helm controller renders and applies the manifests, reconciling the cluster.

Exam tip: Flux is a set of composable GitOps controllers; Argo CD is an application controller with a UI.

Cloud Native Application Delivery: GitOps, Helm, and Deployment Strategies — the lesson that teaches this.

Domain 4: Cloud Native Architecture

12% of the KCNA exam, so 3 of the 25 questions on this page.

Question 23Cloud Native Architecture

An engineer runs kubectl top pods and sees current CPU figures. Next, they want last month's average CPU for the same Pods and plan to query the source of those figures with PromQL. Why will this not work?

Choose one.

  • a
    kubectl top reads metrics-server, which keeps one day of samples on its disk

    metrics-server has no persistent storage and no day of history; it holds only the latest values in memory, and it does not answer PromQL.

  • b
    kubectl top reads the kubelet's log files, which PromQL is not designed to query

    kubectl top reports resource usage from the Metrics API, not from log files on the node.

  • c
    kubectl top reads metrics-server, which keeps no history and is not Prometheus Correct

    Correct. kubectl top uses the Metrics API served by metrics-server, which holds only the current snapshot in memory and does not speak PromQL.

  • d
    kubectl top reads metrics-server, which keeps a week of history in its own format

    metrics-server keeps the latest values in memory with no history, and it does not accept PromQL queries.

The concept

metrics-server and Prometheus are separate: one serves current resource usage, the other stores queryable history.

Why that’s the answer

kubectl top reads the Kubernetes Metrics API, which metrics-server implements by gathering current CPU and memory from kubelets and holding only the latest values in memory. It has no history, on disk or otherwise, and no PromQL interface. Historical questions such as last month's average need Prometheus (or another time-series store), which keeps scraped samples and answers PromQL; its default local retention is 15 days, so a month needs a longer retention setting or long-term storage.

How to reason it out
  1. Identify what backs kubectl top: metrics-server via the Metrics API.
  2. Recall that metrics-server keeps only a current snapshot.
  3. Recall that PromQL is Prometheus's query language, not metrics-server's.
  4. Conclude that historical PromQL queries need Prometheus.

Exam tip: Current usage comes from metrics-server; history and PromQL come from Prometheus.

Observability in Cloud Native: Metrics, Logs, and Traces — the lesson that teaches this.

Question 24Cloud Native Architecture

A team is containerizing an application for Kubernetes. They want kubectl logs to work and want the platform to choose the log destination without changing application code. Where should the application write its logs?

Choose one.

  • a
    To its stdout and stderr streams Correct

    Correct. The container runtime captures stdout and stderr to files on the node, which kubectl logs reads and node agents can ship anywhere.

  • b
    To a file in its writable layer

    A file inside the container's writable layer is not captured by the runtime, so kubectl logs shows nothing and the file is lost with the container.

  • c
    To a file on a mounted volume

    A file on a volume is not what kubectl logs reads; it needs an extra sidecar to stream it, which is a workaround for apps that cannot use stdout.

  • d
    To the central log store's API

    Sending logs straight from code couples the app to one destination, so changing the store means changing code, and kubectl logs still shows nothing.

The concept

The cloud native logging convention is to write logs to stdout and stderr.

Why that’s the answer

When a container writes to stdout and stderr, the container runtime captures those streams into files on the node. kubectl logs reads them, and a node-level agent can forward them to any store. The application never needs to know the destination. Writing to a file in the writable layer or on a volume bypasses that capture, and calling a log store's API from code ties the application to that store.

How to reason it out
  1. Notice both needs: kubectl logs must work, and the destination is the platform's choice.
  2. Recall that kubectl logs reads what the runtime captured from standard streams.
  3. Rule out files and direct API calls, which bypass capture or couple the code.
  4. Choose stdout and stderr.

Exam tip: Log to stdout and stderr; let the platform decide where logs go.

Observability in Cloud Native: Metrics, Logs, and Traces — the lesson that teaches this.

Question 25Cloud Native Architecture

A platform team must ship the stdout and stderr logs of every container in the cluster to a central store. The approach must not require changing any application's Pod spec. Which approach fits?

Choose one.

  • a
    A Fluent Bit Deployment with one replica that reads logs through the API server

    A single replica pulling logs through the API server puts heavy load on the control plane and does not scale with the number of nodes; the standard pattern reads node log files locally.

  • b
    A CronJob that runs kubectl logs for each Pod and uploads the output

    A periodic kubectl logs loop misses logs between runs and from deleted Pods, and it loads the API server; it is not a log-shipping pattern.

  • c
    A Fluent Bit sidecar container added to each Pod to forward that Pod's logs

    A sidecar per Pod works, but it requires editing every application's Pod spec, which the stem rules out, and it costs one agent per Pod instead of per node.

  • d
    A Fluent Bit agent run as a DaemonSet that tails the container log files Correct

    Correct. A DaemonSet puts one agent on every node, where it tails the container log files the runtime writes, adds Pod metadata and forwards them, with no change to application Pods.

The concept

Cluster-wide log collection uses a node-level agent deployed as a DaemonSet.

Why that’s the answer

The container runtime writes each container's stdout and stderr to files on its node. A DaemonSet runs one logging agent, such as Fluent Bit or Fluentd, on every node; it tails those files, enriches records with Pod and namespace metadata and ships them to a central store. Nothing in the application Pods changes. A sidecar per Pod also works but requires editing every Pod spec, which the stem forbids.

How to reason it out
  1. Notice the scope: every container on every node.
  2. Notice the constraint: no change to application Pod specs.
  3. Recall that a DaemonSet runs one copy per node and container logs already sit on the node.
  4. Rule out the sidecar (edits Pod specs) and API-server polling.
  5. Choose the DaemonSet agent.

Exam tip: One logging agent per node, as a DaemonSet, collects every container's logs without touching the apps.

Observability in Cloud Native: Metrics, Logs, and Traces — the lesson that teaches this.

Keep going with KCNA

KCNA practice by domain

KCNA sample questions: your questions

No. Real exam questions are confidential. These are original questions written to the skills in the official KCNA exam guide, so they test the same knowledge in the same style without being copies of the exam.

Source

The domains and weights on this page come from the official KCNA exam guide.