Courseiva

Kubernetes and Cloud Native Associate KCNA (KCNA) — Questions 526600

833 questions total · 12pages · All types, answers revealed

Page 7

Page 8 of 12

Page 9
526
Multi-Selecthard

Which THREE of the following are valid ways to assign a pod to a specific node? (Choose three.)

Select 3 answers
A.Setting the 'nodeName' field in the pod spec
B.Using 'affinity' with 'nodeAffinity' rules
C.Using 'nodeSelector' with label matching
D.Using a ServiceAccount
E.Setting the 'clusterName' field
AnswersA, B, C

Directly assigns the pod to a node.

Why this answer

Setting the 'nodeName' field in the pod spec directly assigns the pod to a specific node by name. This bypasses the scheduler entirely, as the kubelet on that node will see the pod and attempt to run it. It is a valid, though inflexible, method for node assignment.

Exam trap

Candidates often confuse direct node assignment (nodeName) with scheduling constraints (nodeSelector, nodeAffinity). ServiceAccount and clusterName do not affect node placement.

527
MCQmedium

An application deployment in Kubernetes uses a Deployment object. During a rolling update, the new ReplicaSet fails to become healthy. What is the default behavior of the Deployment controller?

A.It continues the rollout, ignoring the health check failures
B.It automatically rolls back to the previous revision
C.It scales down the old ReplicaSet to zero
D.It pauses the rollout and keeps the old ReplicaSet running
AnswerD

By default, the Deployment controller will pause the rollout, leaving the old ReplicaSet active.

Why this answer

By default, the Deployment controller will stop the rollout if the new pods are unhealthy, and the old ReplicaSet remains running.

528
MCQeasy

In the context of the 12-factor app methodology, which factor emphasizes storing configuration in environment variables?

A.Backing services
B.Dependencies
C.Config
D.Codebase
AnswerC

Config is the factor that recommends storing configuration in environment variables.

Why this answer

Factor III of the 12-factor app methodology states that config should be stored in environment variables to keep it separate from code.

529
MCQeasy

What is the primary difference between a container and a virtual machine (VM)?

A.Containers are slower to start than VMs
B.Containers provide stronger isolation than VMs
C.VMs are more portable than containers
D.Containers share the host OS kernel, whereas VMs include a full guest OS
AnswerD

This is the fundamental difference. Containers virtualize the OS, while VMs virtualize the hardware.

Why this answer

The primary difference is that containers share the host operating system kernel and run as isolated user-space processes, while virtual machines include a full guest OS with its own kernel. This architectural distinction means containers are lightweight and start in seconds, whereas VMs require booting a complete OS. Option D correctly captures this fundamental difference.

Exam trap

The trap here is that candidates often confuse 'isolation strength' with 'lightweight nature' — the CNCF exam tests whether you know that VMs provide stronger isolation via hardware virtualization, not that containers are more secure or isolated.

How to eliminate wrong answers

Option A is wrong because containers are faster to start than VMs, not slower — containers start in milliseconds to seconds since they only need to launch a process, while VMs require booting a full guest OS. Option B is wrong because VMs provide stronger isolation than containers — VMs use a hypervisor to create hardware-level isolation between guest OSes, whereas containers rely on kernel namespaces and cgroups, which share the host kernel and have a weaker security boundary. Option C is wrong because containers are more portable than VMs — a container image bundles only the application and its dependencies, making it portable across any Linux host with the same kernel, while a VM image includes a full OS and is tied to specific hypervisor formats (e.g., OVF, VMDK).

530
MCQmedium

A team wants to ensure that at least 99.9% of all requests to their application complete within 500ms over a 30-day window. How should this requirement be classified?

A.Service Level Agreement (SLA)
B.Service Level Objective (SLO)
C.Service Level Indicator (SLI)
D.Key Performance Indicator (KPI)
AnswerB

Correct. This is an internal target for reliability.

Why this answer

An SLO is a target level of reliability, expressed as a percentage of a metric over a time window.

531
MCQhard

A company uses Prometheus for monitoring and wants to alert when the average CPU usage over 5 minutes exceeds 80%. Which PromQL query would correctly define this alert rule?

A.avg(rate(node_cpu_seconds_total{mode="idle"}[5m])) > 0.8
B.avg(node_cpu_seconds_total{mode!="idle"}[5m]) > 0.8
C.avg(rate(node_cpu_seconds_total{mode!="idle"}[5m])) > 0.8
D.sum(rate(node_cpu_seconds_total{mode!="idle"}[5m])) > 0.8
AnswerC

Correct. This calculates the average non-idle (usage) rate over 5 minutes and checks if >80%.

Why this answer

The query should calculate the average CPU usage rate over 5 minutes and compare it to 0.8 (80%).

532
MCQeasy

Which CNCF project maturity level indicates that a project has successfully adopted the CNCF governance and is considered stable for production use?

A.Incubating
B.Experimental
C.Graduated
D.Sandbox
AnswerC

Graduated is the highest level, indicating production readiness.

Why this answer

The Graduated maturity level is the highest in the CNCF project lifecycle, indicating that a project has both successfully adopted CNCF governance and is considered stable for production use. To achieve Graduated, a project must meet rigorous criteria including adoption by multiple end users, a defined governance structure, and completion of a security audit. This distinguishes it from lower maturity levels such as Sandbox (early-stage) and Incubating (growing but not yet stable).

Exam trap

CNCF often tests the distinction between Sandbox and Incubating, where candidates mistakenly think Sandbox implies production readiness, but Sandbox is explicitly for early-stage projects that have not yet demonstrated stability or adopted full CNCF governance.

How to eliminate wrong answers

Option A is wrong because Incubating is an intermediate stage where projects have shown initial adoption and are working toward graduation, but they are not yet considered fully stable for production use. Option B is wrong because Experimental is not a CNCF maturity level; the CNCF uses Sandbox, Incubating, and Graduated, while Experimental is a term used by other foundations or early-stage projects outside the CNCF. Option D is wrong because Sandbox is the entry-level stage for early-stage projects that are not yet ready for production use and have not fully adopted CNCF governance.

533
MCQhard

A Deployment has a strategy of RollingUpdate with maxSurge=1 and maxUnavailable=0. The Deployment manages 3 replicas. The image is updated. What happens during the update?

A.All 3 new Pods are created, and then the old ones are terminated all at once
B.One new Pod is created, and once it is ready, one old Pod is terminated. This repeats until all Pods are updated.
C.All 3 old Pods are terminated simultaneously before new ones start
D.The update fails because maxUnavailable cannot be 0
AnswerB

This matches the rolling update behavior with maxSurge=1 and maxUnavailable=0.

Why this answer

The RollingUpdate strategy with maxSurge=1 and maxUnavailable=0 ensures that during the update, exactly one new Pod is created above the desired replica count (surge of 1) while keeping all existing Pods running (maxUnavailable=0). Once the new Pod reaches the Ready state, one old Pod is terminated, maintaining the desired 3 replicas throughout the process. This cycle repeats until all Pods are updated, guaranteeing zero downtime.

Exam trap

A common misconception is that maxUnavailable=0 prevents any Pod termination, but in a RollingUpdate with maxSurge>0, old Pods are terminated only after new ones are ready, ensuring zero downtime while the update proceeds.

How to eliminate wrong answers

Option A is wrong because it describes a Recreate strategy, not a RollingUpdate; with maxSurge=1, only one new Pod is created at a time, not all three simultaneously. Option C is wrong because terminating all old Pods before starting new ones violates maxUnavailable=0, which prohibits any Pods from being unavailable during the update. Option D is wrong because maxUnavailable=0 is a valid and commonly used setting to ensure zero downtime; the update does not fail as long as there is capacity to surge (maxSurge>0).

534
MCQeasy

In a CI/CD pipeline, what is the difference between continuous delivery and continuous deployment?

A.Continuous delivery requires manual approval for production deployment; continuous deployment automates it
B.Continuous delivery automatically deploys to production; continuous deployment does not
C.There is no difference; the terms are used interchangeably
D.Continuous deployment runs tests; continuous delivery does not
AnswerA

That is the key distinction.

Why this answer

Continuous delivery ensures code is always in a deployable state but requires manual approval for production deployment. Continuous deployment automatically deploys every change to production without manual intervention.

535
Multi-Selectmedium

Which THREE of the following are important security practices in a container image CI/CD pipeline?

Select 3 answers
A.Hardcoding credentials in the image
B.Running containers as root user
C.Signing images to ensure integrity
D.Using minimal base images to reduce attack surface
E.Scanning images for vulnerabilities in the CI pipeline
AnswersC, D, E

Image signing verifies the image was produced by a trusted source.

Why this answer

Image scanning, signing, and using minimal base images are key security practices. Hardcoding credentials and running containers as root are anti-patterns.

536
MCQeasy

What is the purpose of a Kubernetes Service?

A.To provide a stable endpoint for a set of pods
B.To store configuration data as key-value pairs
C.To manage rolling updates of container images
D.To schedule pods onto nodes
AnswerA

Services abstract access to pods and provide load balancing.

Why this answer

A Kubernetes Service provides a stable, virtual IP address and DNS name that acts as a consistent endpoint for accessing a set of pods, even as pods are created, destroyed, or rescheduled. This abstraction decouples clients from the ephemeral nature of pod IPs, enabling reliable communication within the cluster. Services use label selectors to dynamically route traffic to the appropriate pods, and they support multiple types (ClusterIP, NodePort, LoadBalancer) to expose applications internally or externally.

Exam trap

The trap here is that candidates often confuse a Service with a Deployment, thinking both manage pod lifecycle, but a Service only provides network abstraction and does not handle pod creation, scaling, or updates.

How to eliminate wrong answers

Option B is wrong because storing configuration data as key-value pairs is the purpose of a ConfigMap or Secret, not a Service. Option C is wrong because managing rolling updates of container images is handled by a Deployment or StatefulSet controller, not a Service. Option D is wrong because scheduling pods onto nodes is the responsibility of the Kubernetes Scheduler, which uses resource requests, constraints, and affinity rules, while a Service only handles network abstraction and traffic routing.

537
MCQmedium

Which of the following is a valid use case for a DaemonSet?

A.Running a batch job that must complete once
B.Running a stateless web application with multiple replicas
C.Running a stateful application with persistent storage
D.Running a logging agent on every node
AnswerD

DaemonSet ensures the agent runs on each node.

Why this answer

A DaemonSet ensures that a copy of a pod runs on all (or a subset of) nodes in the cluster. This is ideal for infrastructure pods like logging agents (e.g., Fluentd), monitoring agents (e.g., Prometheus Node Exporter), or kube-proxy, which must be present on every node to collect logs or enforce network rules. Option D directly matches this use case.

Exam trap

The trap here is that candidates confuse DaemonSets with Deployments or StatefulSets, assuming any long-running workload fits, but the key differentiator is the 'one pod per node' requirement, not replication count or statefulness.

How to eliminate wrong answers

Option A is wrong because a batch job that must complete once is a use case for a Job or CronJob, not a DaemonSet, which runs continuously on each node. Option B is wrong because a stateless web application with multiple replicas is typically deployed as a Deployment, which manages replicas across nodes without requiring one pod per node. Option C is wrong because a stateful application with persistent storage is best handled by a StatefulSet, which provides stable network identities and persistent storage per pod, unlike a DaemonSet which does not guarantee unique identities or ordered scaling.

538
MCQhard

A team uses Helm to manage a complex application. They want to perform a release upgrade but keep a record of the previous release so they can roll back if needed. Which Helm command should they use?

A.helm delete --purge
B.helm upgrade --history-max 5
C.helm rollback
D.helm install
AnswerB

This upgrades the release and keeps the last 5 revisions, allowing rollback. It retains history.

Why this answer

The 'helm upgrade' command with the '--history-max' flag sets the maximum number of release versions to retain. Without this flag, old versions are kept by default, allowing rollback. Alternatively, 'helm upgrade' alone maintains history; 'helm rollback' is used later.

But the question asks which command to use for the upgrade while keeping history. 'helm upgrade' naturally keeps history unless '--history-max' is set to 0.

539
MCQeasy

What is the smallest deployable unit in Kubernetes?

A.Pod
B.Node
C.Deployment
D.Container
AnswerA

A Pod represents a single instance of a running process.

Why this answer

A Pod is the smallest and simplest unit in the Kubernetes object model. It represents a single instance of a running process in the cluster and encapsulates one or more containers with shared storage and network resources. Containers are not directly scheduled onto Nodes; instead, Kubernetes always schedules and manages Pods as the atomic unit of deployment.

Exam trap

A common trap is to think that a Container is the smallest unit because it is the fundamental runtime entity, but Kubernetes abstracts containers inside Pods, making the Pod the smallest deployable and schedulable object.

How to eliminate wrong answers

Option B is wrong because a Node is a worker machine (physical or virtual) in the cluster, not a deployable unit; Pods are scheduled onto Nodes, but Nodes themselves are not deployed as application units. Option C is wrong because a Deployment is a higher-level controller that manages ReplicaSets and Pods, providing declarative updates and scaling; it is not the smallest deployable unit. Option D is wrong because a Container is the runtime environment for an application process, but Kubernetes does not deploy containers directly; it wraps them inside a Pod, which is the smallest schedulable and deployable entity.

540
Multi-Selecteasy

Which TWO of the following are key principles of cloud native architecture?

Select 2 answers
A.Immutable infrastructure
B.Infrastructure automation
C.Microservices
D.Monolithic design
E.Manual scaling
AnswersB, C

Automation is essential for managing dynamic cloud environments.

Why this answer

Infrastructure automation (B) is a key principle of cloud native architecture because it enables consistent, repeatable, and error-free provisioning and management of infrastructure through code (e.g., Terraform, AWS CloudFormation, Ansible). This aligns with the cloud native goal of reducing manual toil and enabling rapid, reliable deployments. Microservices (C) is also a core principle, as it structures applications as a collection of loosely coupled, independently deployable services that can be scaled and updated individually, which is fundamental to cloud native agility and resilience.

Exam trap

CNCF often tests the distinction between 'key principles' (like microservices and automation) and 'operational patterns' (like immutable infrastructure), leading candidates to select immutable infrastructure as a principle when it is actually a best practice derived from those principles.

541
MCQeasy

What is the OCI (Open Container Initiative) responsible for?

A.Hosting public container images
B.Providing a default container runtime for Kubernetes
C.Managing container orchestration
D.Defining standards for container images and runtimes
AnswerD

The OCI maintains the Image Spec and Runtime Spec to ensure container compatibility.

Why this answer

The Open Container Initiative (OCI) is a Linux Foundation project that defines open industry standards for container image formats and container runtimes. Its two main specifications are the OCI Image Spec (which standardizes the container image layout, including layers and manifests) and the OCI Runtime Spec (which defines the lifecycle and configuration for running containers). This ensures interoperability between different container tools and platforms, such as Docker, Podman, and containerd.

Exam trap

CNCF often tests the misconception that the OCI is a tool or platform (like a registry or runtime) rather than a standards body, leading candidates to confuse it with Docker Hub or containerd.

How to eliminate wrong answers

Option A is wrong because hosting public container images is the role of container registries like Docker Hub, Quay.io, or Google Container Registry, not the OCI. Option B is wrong because providing a default container runtime for Kubernetes is not the OCI's responsibility; Kubernetes uses container runtimes like containerd or CRI-O, which may implement OCI specs but are not provided by the OCI itself. Option C is wrong because managing container orchestration is the function of orchestrators like Kubernetes, Docker Swarm, or Nomad, not the OCI, which focuses solely on standardization.

542
Multi-Selecthard

Which TWO of the following are valid reasons that a PersistentVolumeClaim (PVC) may remain in 'Pending' state?

Select 2 answers
A.The pod that references the PVC is not scheduled yet
B.No PersistentVolume exists that matches the PVC's storage class and size requirements
C.The PVC is using a StorageClass that does not exist
D.The PVC's access mode is 'ReadWriteMany' but the underlying storage only supports 'ReadWriteOnce'
E.The cluster's dynamic provisioner is unavailable or misconfigured
AnswersB, C

No PersistentVolume exists that matches the PVC's storage class and size requirements – Correct. If no matching PV exists, the PVC cannot bind and remains Pending.

Why this answer

A PersistentVolumeClaim (PVC) stays in 'Pending' state until a suitable PersistentVolume (PV) is available to bind. Two common reasons are: (1) No existing PV matches the PVC's storage class and size requirements (static provisioning failure), and (2) The PVC references a StorageClass that does not exist, preventing dynamic provisioning. Other reasons like pod scheduling or dynamic provisioner unavailability are not among the two correct answers.

Exam trap

Candidates often assume only PV unavailability causes Pending, but a missing or misconfigured StorageClass is equally valid. The KCNA exam may test that PVCs using a non-existent StorageClass will also remain Pending.

543
MCQhard

A developer deploys a CronJob that runs a batch job every 5 minutes. After a while, they notice that the job fails with 'DeadlineExceeded' and the pod is stuck in 'PodInitializing' state. What is the most likely reason?

A.A pre-existing InitContainer is failing or stuck
B.The CronJob schedule is misconfigured
C.The container runtime is not installed on the node
D.The job's backoffLimit is set too low
AnswerA

A stuck InitContainer prevents the main container from starting, causing the pod to remain in PodInitializing. If the job's activeDeadlineSeconds passes, the job is terminated with DeadlineExceeded.

Why this answer

The 'PodInitializing' state indicates that the pod is stuck before its main containers can start, which is typically caused by an InitContainer that is failing or hanging. Since the job fails with 'DeadlineExceeded', the pod's activeDeadlineSeconds (or the CronJob's startingDeadlineSeconds) has been reached while the InitContainer is still running, preventing the main container from executing. This is the most likely reason because InitContainers run sequentially to completion before any main containers start, and a stuck InitContainer blocks the entire pod lifecycle.

Exam trap

CNCF often tests the distinction between 'PodInitializing' (caused by InitContainers or image pull issues) and 'ContainerCreating' (caused by container runtime or volume mount problems), leading candidates to incorrectly blame the container runtime or schedule misconfiguration.

How to eliminate wrong answers

Option B is wrong because a misconfigured CronJob schedule (e.g., wrong cron expression) would cause the job to run at incorrect times or not at all, but it would not cause a pod to be stuck in 'PodInitializing' with a 'DeadlineExceeded' error. Option C is wrong because if the container runtime were not installed on the node, the pod would likely remain in 'Pending' state (with an event like 'FailedCreatePodSandBox') rather than reaching 'PodInitializing', and the kubelet would report a runtime error. Option D is wrong because a low backoffLimit affects the number of retries after a job fails (e.g., if the main container exits with non-zero), but it does not cause a pod to be stuck in 'PodInitializing'; the 'DeadlineExceeded' error here is about the pod's active deadline, not the retry limit.

544
MCQmedium

An application requires that a specific set of pods be placed on nodes labeled with 'gpu=true'. Which Kubernetes field should be used in the pod spec to enforce this?

A.nodeSelector
B.topologySpreadConstraints
C.affinity.nodeAffinity
D.tolerations
AnswerA

nodeSelector matches the pod to nodes that have the specified label (e.g., gpu=true).

Why this answer

`nodeSelector` is the simplest and most direct Kubernetes field for constraining a pod to nodes that have a specific label. By setting `nodeSelector: { gpu: 'true' }` in the pod spec, the scheduler will only place the pod on nodes that have the label `gpu=true`. This is a hard constraint that does not support complex expressions but is ideal for the stated requirement.

Exam trap

The trap here is that candidates often confuse `nodeSelector` with `nodeAffinity`, thinking the more advanced field is always required, but the question specifically asks for the field that enforces placement on labeled nodes, and `nodeSelector` is the simplest and correct answer for a straightforward label match.

How to eliminate wrong answers

Option B is wrong because `topologySpreadConstraints` controls how pods are distributed across topology domains (e.g., zones, nodes) to achieve even spreading, not to enforce placement on nodes with a specific label. Option C is wrong because `affinity.nodeAffinity` can also enforce placement on labeled nodes, but it is a more advanced and flexible field that supports both required and preferred rules; the question asks for the field that should be used, and `nodeSelector` is the simplest and most direct answer for a simple label match. Option D is wrong because `tolerations` allow pods to be scheduled on nodes with matching taints, but they do not enforce placement on nodes with a specific label; they only permit scheduling on otherwise tainted nodes.

545
MCQmedium

Which component runs on every worker node and ensures that containers are running in a Pod as specified in the Pod manifest?

A.kube-controller-manager
B.container runtime
C.kubelet
D.kube-proxy
AnswerC

kubelet is the node agent that reads Pod manifests and ensures containers are running.

Why this answer

The kubelet is the primary node agent that runs on every worker node in a Kubernetes cluster. It receives Pod specifications (Pod manifests) from the API server, either directly or via the kube-apiserver, and ensures that the containers described in those manifests are running and healthy. It does this by interacting with the container runtime (e.g., containerd or CRI-O) to start, stop, and monitor containers as needed.

Exam trap

The trap here is that candidates often confuse the container runtime with the kubelet, thinking the runtime directly reads Pod manifests, when in fact the kubelet is the orchestrator that interprets the manifest and delegates container operations to the runtime via the CRI.

How to eliminate wrong answers

Option A is wrong because kube-controller-manager runs on the control plane, not on worker nodes; it manages controllers like the ReplicaSet controller and Node controller, but does not directly ensure containers are running on a specific node. Option B is wrong because the container runtime (e.g., containerd, CRI-O) is responsible for actually running containers, but it does not interpret Pod manifests or enforce the desired state; it only executes commands from the kubelet via the Container Runtime Interface (CRI). Option D is wrong because kube-proxy runs on each node but handles network proxying and service load balancing (e.g., iptables or IPVS rules), not container lifecycle management.

546
MCQhard

A developer creates a Service of type ClusterIP in namespace 'default'. They attempt to reach the Service from another pod in the same namespace using the Service name 'my-svc'. The connection fails. What is the most likely cause?

A.The Service port does not match the container port
B.The cluster DNS service (CoreDNS) is not running or misconfigured
C.The Service type should be NodePort
D.The Service selector does not match any pod labels
AnswerB

DNS is required for Service name resolution.

Why this answer

The most likely cause is that the cluster DNS service (CoreDNS) is not running or misconfigured. When a pod attempts to reach a Service by its DNS name (e.g., 'my-svc'), Kubernetes relies on CoreDNS to resolve that name to the ClusterIP. If CoreDNS is down, misconfigured, or the pod's DNS resolver is not pointing to it, the name resolution fails, causing the connection to fail even if the Service itself is correctly configured.

Exam trap

The trap here is that candidates often assume the issue is with the Service configuration (selector or port) rather than the underlying DNS infrastructure, because they forget that name resolution is a prerequisite for Service discovery within the cluster.

How to eliminate wrong answers

Option A is wrong because a port mismatch would cause a connection timeout or connection refused at the transport layer, but the question states the connection fails entirely, which is more indicative of a DNS resolution failure. Option C is wrong because a ClusterIP Service is perfectly reachable from within the same namespace by its DNS name; NodePort is only needed for external access. Option D is wrong because if the Service selector does not match any pod labels, the Service would have no endpoints, but the connection attempt would still resolve the DNS name and reach the ClusterIP, resulting in a connection refused or timeout, not a complete failure to connect.

547
Matchingmedium

Match each CNCF project to its primary function.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Monitoring and alerting toolkit

High-performance proxy for service mesh

Package manager for Kubernetes

Distributed key-value store for cluster state

DNS server for service discovery in Kubernetes

Why these pairings

The correct matches are: Kubernetes → Container orchestration, Envoy → Service proxy, Fluentd → Log collection. Common confusions include mixing Prometheus (monitoring) with Fluentd (logging) and CoreDNS (DNS) with Prometheus.

548
MCQhard

A pod is in CrashLoopBackOff state. 'kubectl logs pod' shows 'Error: cannot connect to database at db-service:5432'. The database Service exists and is reachable from other pods. What is the most likely cause?

A.The kube-proxy is not functioning
B.The pod's resource limits are too low
C.The database pod is not running
D.The application's configuration has incorrect database connection details
AnswerD

Why this answer

The error indicates the application cannot connect to the database. Since other pods can reach the database, the issue is specific to this pod. A common cause is that the pod's configuration (e.g., environment variables, config file) contains wrong connection details, such as incorrect service name, port, or credentials.

549
MCQeasy

What is the primary purpose of the CNCF (Cloud Native Computing Foundation)?

A.To host and nurture open source cloud native projects
B.To develop proprietary cloud software
C.To certify individuals in cloud technologies
D.To provide commercial support for Kubernetes
AnswerA

The CNCF hosts projects like Kubernetes, Prometheus, and others to advance cloud native technologies.

Why this answer

The CNCF's mission is to make cloud native computing ubiquitous by fostering and sustaining open source projects that follow cloud native principles.

550
Multi-Selectmedium

Which TWO of the following are true about Kubernetes Pods?

Select 2 answers
A.A Pod always runs exactly one container
B.Pods are automatically rescheduled if a node fails
C.A Pod is the smallest deployable unit in Kubernetes
D.Containers within the same Pod share the same network namespace
E.Pods are directly created by the kube-scheduler
AnswersC, D

Pods are the smallest and simplest Kubernetes object.

Why this answer

A Pod is the smallest and most basic deployable unit in Kubernetes. It represents a single instance of a running process and encapsulates one or more containers, storage resources, and a unique network IP. You cannot deploy a container directly; you must always wrap it in a Pod.

Exam trap

The trap here is that candidates confuse the Pod's ability to run multiple containers with the requirement to run exactly one, or they mistakenly think the scheduler creates Pods instead of only assigning them to nodes.

551
Multi-Selecthard

Which THREE of the following are benefits of using a service mesh? (Select three.)

Select 3 answers
A.Automatic scaling of pods
B.Increased application performance
C.Fine-grained traffic control (e.g., canary deployments)
D.Improved observability through metrics and tracing
E.Simplified service-to-service security with mutual TLS
AnswersC, D, E

Service mesh enables advanced traffic routing.

Why this answer

A service mesh, such as Istio or Linkerd, provides fine-grained traffic control through features like traffic splitting, header-based routing, and weighted load balancing. This enables canary deployments by directing a small percentage of traffic to a new version of a service, allowing safe testing in production without affecting all users.

Exam trap

CNCF often tests the misconception that a service mesh improves performance or handles autoscaling, when in fact it focuses on traffic management, security, and observability at the cost of some latency.

552
MCQhard

A pod is running but its container exits with code 137. The pod logs show 'Killed'. What is the most likely cause?

A.The container's CPU limit was exceeded
B.The container's liveness probe failed
C.The container was OOMKilled due to memory limit
D.The node ran out of disk space
AnswerC

Exit code 137 is SIGKILL, often from OOM. The pod status would show OOMKilled.

Why this answer

Exit code 137 (128 + 9) indicates the container was terminated by SIGKILL. Combined with 'Killed' in logs, this is the definitive signature of an OOMKill event, where the Linux kernel's Out-Of-Memory (OOM) killer terminates the container process because it exceeded its memory limit (specified in the pod's resource limits). Kubernetes enforces memory limits via cgroups, and when the container's memory usage surpasses the limit, the OOM killer sends SIGKILL, resulting in exit code 137.

Exam trap

CNCF often tests the distinction between CPU throttling (which does not kill) and OOMKill (which does), and the trap here is that candidates confuse 'Killed' in logs with a generic failure, not recognizing exit code 137 as the specific OOMKill signal.

How to eliminate wrong answers

Option A is wrong because exceeding CPU limits causes CPU throttling (container runs slower) but never triggers a kill or exit code 137; the container continues running. Option B is wrong because a liveness probe failure results in Kubernetes restarting the container with exit code 143 (SIGTERM) or 0, not 137, and the logs would show 'Liveness probe failed' not 'Killed'. Option D is wrong because node disk pressure leads to pod eviction (not container OOM kill) with a different exit code and a Kubernetes event like 'Evicted', not exit code 137 and 'Killed' in container logs.

553
Multi-Selectmedium

Which TWO of the following are core principles of the 12-factor app methodology? (Select TWO.)

Select 2 answers
A.Manual approval for all production deployments
B.Use of a single programming language across all services
C.Store logs in a local file system
D.Strict separation of config from code
E.Maximize robustness through fast startup and graceful shutdown
AnswersD, E

Config should be stored in environment variables.

Why this answer

The 12-factor app methodology mandates strict separation of config from code. Config includes things like database connection strings, API keys, and environment-specific values that vary between deployments. Storing these in environment variables (or external config files not checked into version control) ensures that the same codebase can be deployed to different environments without modification, which is a core principle for cloud-native portability and security.

Exam trap

CNCF often tests the misconception that logs should be stored locally for reliability, but the 12-factor methodology treats logs as event streams to stdout, relying on the execution environment (e.g., kubectl logs, log shippers) for aggregation and persistence.

554
MCQeasy

Refer to the exhibit. The deployment above is created, but the pods are not receiving traffic from the associated Service. The Service selector matches 'app: web'. The Service endpoints list is empty. What is the most likely cause?

A.The Service selector does not match the pod labels
B.The containerPort is set to 80, but the Service targetPort is 8080
C.The readiness probe endpoint /health does not exist in the nginx container
D.The nginx:1.21 image is not available in the container registry
AnswerC

The readiness probe is configured to GET /health on port 80, but the default nginx image does not serve a /health page. The probe fails, so the pod is not ready and is removed from Service endpoints.

Why this answer

A readiness probe that fails (e.g., the /health endpoint does not exist in the nginx container) will cause the pod to be marked as not ready. Kubernetes removes pods with failing readiness probes from the Service's endpoints list, resulting in an empty endpoints list even though the Service selector matches the pod labels. This is a common misconfiguration where the probe endpoint is not actually served by the container.

Exam trap

CNCF often tests the distinction between readiness probes and liveness probes, and the trap here is that candidates assume a missing endpoint only affects liveness (causing restarts) rather than readiness (causing removal from Service endpoints).

How to eliminate wrong answers

Option A is wrong because the question states that the Service selector matches 'app: web', and the pods are created with that label, so the selector does match. Option B is wrong because the containerPort and Service targetPort are independent; the Service routes traffic to the containerPort, not the targetPort, and a mismatch would not cause an empty endpoints list—it would cause connection failures to the pod. Option D is wrong because an unavailable container image would prevent the pod from running (e.g., ImagePullBackOff), but the question says the pods are created and not receiving traffic, implying they are running; an unavailable image would not lead to an empty endpoints list.

555
MCQhard

You deploy a new version of your application by updating the container image in the Deployment manifest. The rollout seems to be progressing, but after a few minutes you notice that the new Pods are failing and the old Pods are still running. What is the most likely reason?

A.The Deployment was created with 'kubectl create deployment' instead of 'kubectl apply'
B.The new Pods are failing readiness probes, so the Deployment pauses the rollout and keeps the old replicas
C.The new Pods are not receiving traffic because the Service selector doesn't match
D.The Deployment's update strategy is set to 'Recreate'
AnswerB

If readiness probes fail, the new Pods are not considered ready, and the Deployment controller will not continue the rollout, preserving the old replicas.

Why this answer

When a new Pod fails its readiness probe, the Deployment controller considers the new ReplicaSet unhealthy and pauses the rollout. The controller keeps the old ReplicaSet running to maintain the desired number of available replicas, preventing traffic disruption until the new Pods pass their probes or the rollout is manually resumed.

Exam trap

The CNCF Kubernetes exam often tests the distinction between liveness and readiness probes; candidates mistakenly think a failing liveness probe causes the same behavior, but only readiness probe failures pause a rollout while liveness failures restart the Pod without affecting the rollout progress.

How to eliminate wrong answers

Option A is wrong because 'kubectl create deployment' and 'kubectl apply' both create a Deployment resource; the command used does not affect rollout behavior or cause Pod failures. Option C is wrong because a Service selector mismatch would prevent traffic from reaching new Pods, but it would not cause the old Pods to remain running during a rollout; the Deployment would still replace old Pods with new ones. Option D is wrong because the 'Recreate' strategy terminates all old Pods before creating new ones, so old Pods would not still be running; the scenario describes old Pods remaining, which matches a rolling update with a paused rollout due to failed readiness probes.

556
MCQeasy

Which command would you use to view the logs of a container named 'nginx' in a Pod named 'web-pod'?

A.kubectl logs web-pod -c nginx
B.kubectl logs web-pod nginx
C.kubectl describe pod web-pod
D.kubectl exec web-pod -- cat /var/log/nginx/access.log
AnswerA

The -c flag specifies the container name when there are multiple containers.

Why this answer

The `kubectl logs` command retrieves container logs from a Pod, and when a Pod contains multiple containers, the `-c` flag is required to specify which container's logs to view. Here, `kubectl logs web-pod -c nginx` explicitly targets the 'nginx' container within the 'web-pod' Pod, which is the standard Kubernetes API approach for fetching container stdout/stderr streams.

Exam trap

The trap here is that candidates often assume `kubectl logs` can accept the container name as a positional argument without the `-c` flag, confusing it with `kubectl exec` syntax where the container name can be specified with `-c` but is optional if there's only one container.

How to eliminate wrong answers

Option B is wrong because `kubectl logs web-pod nginx` omits the required `-c` flag; in kubectl syntax, the container name must be preceded by `-c` or `--container`, otherwise the command will fail or misinterpret the argument. Option C is wrong because `kubectl describe pod web-pod` shows the Pod's metadata, status, and events, but does not display the live container logs; it only provides a snapshot of the Pod's configuration and recent events, not the actual log output. Option D is wrong because `kubectl exec web-pod -- cat /var/log/nginx/access.log` attempts to read a file from the container's filesystem, but container logs in Kubernetes are typically written to stdout/stderr and captured by the container runtime, not stored in a file at that path unless explicitly configured; this approach is non-standard and may fail if the file does not exist or the container does not have a shell.

557
MCQmedium

A pod in the 'production' namespace is in a CrashLoopBackOff state. The pod has been running successfully for several days. You run 'kubectl describe pod app-pod -n production' and see the message: 'OOMKilled'. What is the MOST appropriate action to resolve this issue?

A.Delete and recreate the pod to clear the crash loop
B.Delete the namespace and redeploy all workloads
C.Increase the memory limit in the pod's container resource specification
D.Increase the CPU request for the container
AnswerC

OOMKilled indicates the container exceeded its configured memory limit. Increasing the memory limit allows the container to use more memory and prevents the OOM kill.

Why this answer

The pod is in CrashLoopBackOff due to OOMKilled, which means the container's memory usage exceeded its configured memory limit. The most appropriate action is to increase the memory limit in the pod's container resource specification, allowing the container to use more memory without being terminated by the Out-Of-Memory (OOM) killer. This directly addresses the root cause—insufficient memory allocation—while preserving the existing pod configuration and data.

Exam trap

The trap here is that candidates may confuse OOMKilled with a generic crash or resource issue and choose to delete/recreate the pod (Option A) or adjust CPU (Option D), rather than recognizing that the specific OOMKilled message points directly to a memory limit problem that must be addressed by increasing the memory limit.

How to eliminate wrong answers

Option A is wrong because deleting and recreating the pod does not resolve the underlying memory limit issue; the new pod would still have the same resource constraints and would likely be OOMKilled again. Option B is wrong because deleting the entire namespace and redeploying all workloads is an extreme, disruptive action that unnecessarily affects other workloads and does not target the specific pod's memory problem. Option D is wrong because increasing the CPU request does not affect memory allocation; the OOMKilled error is caused by memory exhaustion, not CPU starvation, so this change would not prevent the container from being killed.

558
MCQeasy

A developer wants to ensure that a pod runs only on nodes with SSDs. Which mechanism should be used?

A.Apply a taint to nodes without SSDs and add tolerations to the pod
B.Use pod anti-affinity
C.Add a nodeSelector with disktype: ssd
D.Define a ResourceQuota
AnswerC

nodeSelector ensures pods are scheduled on nodes with the specified label.

Why this answer

`nodeSelector` is a simple and direct mechanism in Kubernetes to constrain a pod to run only on nodes that have a specific label, such as `disktype=ssd`. By labeling nodes with SSDs and adding the corresponding `nodeSelector` in the pod spec, the scheduler ensures the pod is placed exclusively on those nodes. This approach is straightforward and does not require complex scheduling constraints or resource management.

Exam trap

The trap here is that candidates often confuse taints/tolerations with node selection, thinking they can be used to force pods onto specific hardware, when in fact taints repel pods and tolerations allow exceptions, whereas `nodeSelector` or `nodeAffinity` are the correct tools for positive selection.

How to eliminate wrong answers

Option A is wrong because taints and tolerations are used to repel pods from nodes (or allow them to tolerate repulsion), not to positively select nodes with specific hardware; they control which pods can run on a node but do not guarantee a pod will only run on nodes with SSDs. Option B is wrong because pod anti-affinity is used to prevent pods from co-locating on the same node or topology, not to select nodes based on hardware attributes like SSDs. Option D is wrong because a ResourceQuota limits resource consumption within a namespace and cannot influence node selection based on hardware characteristics.

559
MCQeasy

What is the primary purpose of the CNCF (Cloud Native Computing Foundation)?

A.To develop proprietary cloud software
B.To define cloud-native standards only
C.To certify cloud providers
D.To host and support open-source cloud-native projects
AnswerD

CNCF provides governance, marketing, and support for cloud-native open-source projects.

Why this answer

The CNCF hosts, supports, and sustains open-source cloud-native projects, ensuring they are vendor-neutral and fostering community collaboration. It does not develop projects itself but provides a governance model.

560
MCQmedium

Which of the following is true about Prometheus's pull-based model for collecting metrics?

A.Targets push metrics to Prometheus
B.Prometheus only collects metrics from Kubernetes API server
C.Prometheus scrapes metrics from HTTP endpoints
D.Prometheus stores metrics in a relational database
AnswerC

Prometheus pulls (scrapes) metrics from targets' /metrics endpoints.

Why this answer

Prometheus pulls metrics from targets at regular intervals, which is the pull-based model.

561
MCQhard

A Prometheus alert rule fires when the error rate exceeds 5% for 5 minutes. The alert is sent to Alertmanager. What must be configured in Alertmanager to ensure the alert is deduplicated, grouped, and routed to the correct team?

A.An inhibition rule
B.A recording rule
C.A silence rule
D.A route configuration
AnswerD

Routes in Alertmanager define grouping, deduplication, and which receiver to use.

Why this answer

Alertmanager uses routes to match alerts and receivers to send notifications. Routes define grouping and routing logic.

562
MCQhard

You run 'kubectl get pods' and see a pod in 'Pending' state for over 5 minutes. You describe the pod and see '0/1 nodes are available: 1 Insufficient memory'. What is the most likely cause?

A.The container image is too large
B.The pod's memory request is larger than any node's allocatable memory
C.The pod has a liveness probe that is failing
D.The kubelet on the node is not running
AnswerB

If the memory request exceeds the available memory on all nodes, the scheduler cannot place the pod, leaving it in Pending.

Why this answer

The '0/1 nodes are available: 1 Insufficient memory' message indicates that the Kubernetes scheduler could not place the pod because no node has enough allocatable memory to satisfy the pod's memory request. Option B is correct because the pod's memory request exceeds the available memory on any node, causing the pod to remain in Pending state indefinitely until sufficient resources become available.

Exam trap

CNCF often tests the distinction between resource requests (used for scheduling) and resource limits (used for throttling/eviction), so candidates mistakenly think a large image or probe failure causes Pending state, but the scheduler only cares about resource requests and node availability.

How to eliminate wrong answers

Option A is wrong because a large container image affects image pull time and disk space, not the scheduler's memory allocation decision; the scheduler only considers resource requests and limits, not image size. Option C is wrong because a failing liveness probe would cause the pod to be restarted or become CrashLoopBackOff, not remain in Pending state; liveness probes only run after the pod is scheduled and running. Option D is wrong because if the kubelet were not running, the node would show as NotReady or be absent from 'kubectl get nodes', and the scheduler would report a different error like '0/1 nodes are available: 1 node(s) had taint that the pod didn't tolerate' or 'node(s) were unschedulable'.

563
Multi-Selectmedium

Which THREE of the following are core components of a Kubernetes worker node?

Select 3 answers
A.etcd
B.kube-apiserver
C.container runtime
D.kube-proxy
E.kubelet
AnswersC, D, E

Container runtime runs containers.

Why this answer

A container runtime is a core component of a Kubernetes worker node. It is responsible for actually running the containers (e.g., containerd, CRI-O) and is required by the kubelet to manage pod lifecycle. Without a container runtime, the kubelet cannot start or stop containers on the node.

Exam trap

The trap here is that candidates often confuse control plane components (etcd, kube-apiserver) with worker node components, especially when they see them listed together in a question about cluster architecture.

564
MCQeasy

Which Kubernetes component is the primary entry point for all administrative tasks and API requests?

A.kube-controller-manager
B.etcd
C.kube-apiserver
D.kube-scheduler
AnswerC

It is the front-end for the Kubernetes control plane.

Why this answer

The kube-apiserver is the front-end of the Kubernetes control plane and the sole entry point for all administrative tasks and API requests. It validates and processes RESTful API calls (using JSON/YAML over HTTP/HTTPS) before persisting state to etcd or delegating work to other controllers. Without the API server, no kubectl command, automation script, or internal component can interact with the cluster.

Exam trap

CNCF often tests the misconception that etcd is the primary entry point because it stores all cluster data, but the trap is that etcd is never accessed directly by users or external tools — all interactions must go through the kube-apiserver, which acts as the single gateway for security and consistency.

How to eliminate wrong answers

Option A is wrong because the kube-controller-manager is a control loop that watches the shared state via the API server and makes changes to move the current state toward the desired state; it does not accept external API requests directly. Option B is wrong because etcd is a distributed key-value store used for cluster state persistence, not an API endpoint; all reads and writes to etcd go through the kube-apiserver. Option D is wrong because the kube-scheduler is responsible for assigning pods to nodes based on resource availability and constraints, and it receives its instructions from the API server, not from external administrative requests.

565
MCQeasy

Which Kubernetes component is responsible for storing the cluster state?

A.kube-scheduler
B.kube-apiserver
C.etcd
D.kube-controller-manager
AnswerC

etcd stores all cluster state, including configurations and desired state.

Why this answer

etcd is a distributed, consistent key-value store used by Kubernetes to store all cluster data, including configuration, state, and metadata. It is the single source of truth for the cluster; without etcd, the cluster cannot maintain or recover its state. The kube-apiserver is the only component that communicates directly with etcd, but it is etcd itself that physically stores the data.

Exam trap

CNCF often tests the misconception that kube-apiserver stores the cluster state because it is the central API gateway, but the trap is that kube-apiserver only mediates access while etcd is the actual persistent storage layer.

How to eliminate wrong answers

Option A is wrong because kube-scheduler is responsible for assigning pods to nodes based on resource availability and constraints, not for storing cluster state. Option B is wrong because kube-apiserver is the front-end for the Kubernetes control plane that validates and processes API requests, but it does not store data; it reads from and writes to etcd. Option D is wrong because kube-controller-manager runs controller processes (e.g., Node Controller, Replication Controller) that regulate cluster state, but it does not persist state itself.

566
Multi-Selectmedium

Which TWO of the following are valid ways to expose a set of pods to traffic from outside the Kubernetes cluster?

Select 2 answers
A.Service of type NodePort
B.Ingress
C.Service of type ExternalName
D.Service of type ClusterIP
E.Service of type LoadBalancer
AnswersA, E

Why this answer

A Service of type NodePort exposes the service on a static port on each node's IP address. Traffic sent to that port on any cluster node is forwarded to the underlying service, making it accessible from outside the cluster without requiring a cloud load balancer.

Exam trap

CNCF often tests the distinction between Ingress (a routing layer) and Service types (the actual exposure mechanism), leading candidates to mistakenly select Ingress as a direct exposure method.

567
MCQmedium

You have a microservices application deployed as a set of Pods in a Kubernetes cluster. You need to ensure that Pods can discover each other using stable DNS names. Which Kubernetes resource should you create?

A.ConfigMap
B.Ingress
C.Service
D.Deployment
AnswerC

A Service exposes a stable DNS name (e.g., my-service.namespace.svc.cluster.local) for Pods.

Why this answer

A Service of type ClusterIP (the default) provides a stable virtual IP and DNS name (e.g., my-service.namespace.svc.cluster.local) that resolves to the Pods selected by its label selector. This allows Pods to discover each other using consistent DNS names, regardless of Pod IP changes due to scaling or restarts. The kube-dns or CoreDNS addon automatically creates DNS records for Services, enabling service discovery within the cluster.

Exam trap

CNCF often tests the misconception that a Deployment itself provides stable DNS names, but Deployments only manage Pod replicas; the Service resource is required to expose a stable network endpoint and DNS record.

How to eliminate wrong answers

Option A is wrong because a ConfigMap is used to store configuration data as key-value pairs, not to provide network endpoints or DNS names for Pod discovery. Option B is wrong because an Ingress manages external HTTP/HTTPS traffic routing to Services, not internal Pod-to-Pod DNS-based discovery. Option D is wrong because a Deployment manages the desired state and lifecycle of Pods (replicas, updates), but does not create a stable network identity or DNS name for Pods to discover each other.

568
MCQmedium

Which component in an event-driven architecture is responsible for decoupling event producers from consumers?

A.Config server
B.Event broker
C.API gateway
D.Service mesh
AnswerB

Event broker (e.g., Kafka, RabbitMQ) decouples producers and consumers by managing event streams.

Why this answer

An event broker (or message broker) acts as an intermediary that receives events from producers and delivers them to consumers, allowing loose coupling. The API gateway handles synchronous requests. The service mesh handles service-to-service communication.

The config server manages configuration.

569
MCQmedium

In a microservices architecture, which pattern is used to prevent cascading failures by limiting the number of concurrent requests to a service?

A.Bulkhead
B.Timeout
C.Retry
D.Circuit breaker
AnswerA

Bulkhead limits concurrent requests to protect resources.

Why this answer

The bulkhead pattern isolates resources to prevent failure propagation. Circuit breaker stops calls after failures, retry reattempts, and timeout limits wait time.

570
MCQhard

You create a Service of type NodePort with nodePort: 30080. The cluster's nodes have IP addresses 10.0.0.1 and 10.0.0.2. From outside the cluster, which address and port can you use to access the Service?

A.10.0.0.1:30080
B.10.0.0.1:80
C.ClusterIP:80
D.10.0.0.2:8080
AnswerA

NodePort makes the service accessible on each node's IP at the nodePort.

Why this answer

A NodePort service exposes the same port (nodePort: 30080) on every node in the cluster. From outside the cluster, you can reach the service using the IP address of any node (e.g., 10.0.0.1) combined with the nodePort (30080). The kube-proxy on that node will forward traffic to the service's ClusterIP and then to the selected pods.

Exam trap

The KCNA often tests the distinction between ClusterIP (internal-only) and NodePort (external access via nodeIP:nodePort), trapping candidates who confuse the service port (e.g., 80) with the nodePort (e.g., 30080) or think ClusterIP is externally routable.

How to eliminate wrong answers

Option B is wrong because port 80 is the default ClusterIP port, not the nodePort; NodePort services require the nodePort (30080) to be accessed externally. Option C is wrong because ClusterIP is only reachable from within the cluster, not from outside; external traffic must use a node's IP and the nodePort. Option D is wrong because 10.0.0.2:8080 uses an incorrect port (8080 instead of 30080) and implies a different service or port mapping; the nodePort must match the configured value (30080).

571
MCQeasy

Which practice is a key principle of cloud-native architecture?

A.Automated CI/CD pipelines
B.Manual configuration management
C.Tight coupling of services
D.Preferring stateful applications over stateless
AnswerA

Enables rapid and reliable deployments.

Why this answer

Automated CI/CD pipelines are a key principle of cloud-native architecture because they enable rapid, reliable, and repeatable delivery of microservices. By automating build, test, and deployment stages, teams can achieve continuous integration and continuous delivery, which aligns with the cloud-native goals of agility, scalability, and resilience. This automation reduces human error and accelerates the feedback loop, essential for managing distributed systems in dynamic cloud environments.

Exam trap

CNCF often tests the misconception that manual configuration management is acceptable in cloud-native environments, but the trap here is that candidates confuse traditional IT operations with the automated, declarative approach required for cloud-native scalability and resilience.

How to eliminate wrong answers

Option B is wrong because manual configuration management contradicts the cloud-native principle of declarative, automated infrastructure (e.g., using Kubernetes manifests or Terraform), leading to configuration drift and reduced scalability. Option C is wrong because tight coupling of services violates the microservices tenet of loose coupling, which is fundamental to independent deployability and fault isolation in cloud-native architectures. Option D is wrong because cloud-native architecture prefers stateless applications over stateful ones, as stateless services scale horizontally more easily and are simpler to manage; state is typically offloaded to external stores like databases or caches.

572
MCQmedium

A company deploys a microservice application on Kubernetes. They notice that one of the services is returning 5xx errors intermittently. Which observability tool should they use to correlate the errors with resource usage across all pods of that service?

A.Prometheus
B.Grafana
C.Fluentd
D.Jaeger
AnswerA

Prometheus collects metrics and can correlate error rates with resource usage via labels.

Why this answer

Prometheus is the correct choice because it is a monitoring and alerting toolkit designed to collect and store time-series metrics, such as CPU, memory, and request error rates. By querying Prometheus with PromQL, you can correlate 5xx error spikes with resource usage across all pods of a service, as it scrapes metrics from each pod's /metrics endpoint. This direct correlation of application-level errors with infrastructure metrics is not natively provided by the other tools listed.

Exam trap

The KCNA exam often tests the distinction between observability pillars (metrics, logs, traces) and their specific tools, so the trap here is confusing Grafana (a visualization layer) with Prometheus (a metrics backend) or assuming Jaeger (tracing) can correlate resource usage metrics.

How to eliminate wrong answers

Option B (Grafana) is wrong because Grafana is a visualization and dashboarding tool, not a data source; it cannot collect or correlate metrics on its own and relies on Prometheus or other backends for data. Option C (Fluentd) is wrong because Fluentd is a log collector and forwarder, focused on unstructured log data, not on time-series metrics or direct correlation with resource usage. Option D (Jaeger) is wrong because Jaeger is a distributed tracing tool for tracking request paths across services, not for correlating error rates with resource usage metrics like CPU or memory.

573
Multi-Selectmedium

Which TWO of the following are characteristics of a microservices architecture? (Select 2)

Select 2 answers
A.Independent deployment of services
B.Tight coupling between services
C.Loose coupling between services
D.Monolithic codebase
E.Shared database for all services
AnswersA, C

Each microservice can be deployed independently.

Why this answer

Microservices architecture is designed to allow each service to be developed, tested, and deployed independently without affecting other services. This independence is achieved through well-defined APIs and versioning strategies, enabling continuous delivery and rapid iteration. In Kubernetes, for example, each microservice can be packaged as a separate container and deployed via its own Deployment resource, allowing updates to one service without downtime for the entire application.

Exam trap

CNCF often tests the misconception that microservices require a shared database for consistency, but the correct pattern is database-per-service to maintain loose coupling and independent scalability.

574
MCQmedium

A developer wants to deploy a stateful application that requires stable network identities and persistent storage. Which Kubernetes resource is best suited for this workload?

A.Deployment
B.DaemonSet
C.StatefulSet
D.Job
AnswerC

StatefulSet provides stable, unique network identifiers and persistent storage for stateful applications.

Why this answer

StatefulSet is the correct choice because it is designed specifically for stateful applications that require stable, unique network identities (via headless Services and ordinal hostnames) and persistent storage (via PersistentVolumeClaims that are retained across Pod rescheduling). Unlike Deployments, StatefulSets guarantee ordered deployment, scaling, and termination, which is essential for databases or message queues.

Exam trap

CNCF often tests the misconception that Deployment can handle stateful workloads because it supports PersistentVolumeClaims, but the trap is that Deployment does not guarantee stable network identities or ordered Pod management, which are critical for stateful applications like databases.

How to eliminate wrong answers

Option A is wrong because Deployment is intended for stateless applications and creates Pods with random, ephemeral identities and no guaranteed storage persistence; it does not provide stable network identities. Option B is wrong because DaemonSet ensures that a copy of a Pod runs on each node (or a subset of nodes) for node-level services like logging or monitoring, not for stateful workloads requiring stable identities and persistent storage. Option D is wrong because Job is designed for batch or one-time tasks that run to completion, not for long-running stateful applications that need persistent storage and stable network identities.

575
Multi-Selectmedium

Which TWO statements are true about Kubernetes Deployments?

Select 2 answers
A.Deployments support rolling updates and rollbacks.
B.Deployments are the recommended controller for stateful applications.
C.A Deployment creates a ReplicaSet to ensure the desired number of pod replicas are running.
D.Deployments can expose applications externally via a built-in load balancer.
E.Deployments are used to run a pod on every node in the cluster.
AnswersA, C

Rolling updates and rollbacks are core features of Deployments.

Why this answer

Deployments inherently support rolling updates and rollbacks through their declarative update strategy. When you change the pod template in a Deployment, it creates a new ReplicaSet and gradually scales it up while scaling down the old ReplicaSet, ensuring zero-downtime updates. If the update fails, you can roll back to a previous revision using `kubectl rollout undo`, which reverts the Deployment to a prior ReplicaSet state.

Exam trap

CNCF often tests the misconception that Deployments are suitable for stateful workloads or that they inherently expose applications externally, when in fact StatefulSets and Services are the correct components for those responsibilities.

576
Multi-Selecteasy

Which TWO of the following are essential components of a GitOps workflow? (Select two.)

Select 2 answers
A.A separate database for storing desired state
B.A monitoring dashboard for visualizations
C.A CI/CD pipeline that manually applies changes
D.An operator that synchronizes the cluster state with the Git repository
E.A Git repository storing declarative configurations
AnswersD, E

The operator continuously watches Git and applies changes.

Why this answer

A GitOps workflow relies on an operator (such as Argo CD or Flux) that continuously reconciles the actual cluster state with the desired state declared in a Git repository. This operator automatically detects drift and applies changes to ensure the cluster matches the Git source, which is the core feedback loop of GitOps.

Exam trap

CNCF often tests the misconception that a CI/CD pipeline is the core of GitOps, but the trap here is that GitOps replaces manual or pipeline-driven deployments with an automated reconciliation loop driven by an operator and a Git repository as the source of truth.

577
MCQmedium

Which of the following best describes the purpose of the CNCF (Cloud Native Computing Foundation)?

A.To foster and sustain the cloud native ecosystem through project lifecycle management
B.To standardize cloud computing APIs across cloud providers
C.To own and maintain the Kubernetes project exclusively
D.To provide cloud infrastructure services to open source projects
AnswerA

The CNCF manages projects through graduated, incubating, and sandbox stages to foster the cloud native ecosystem.

Why this answer

The CNCF's primary purpose is to foster and sustain the ecosystem of cloud native technologies through project lifecycle management, including sandbox, incubation, and graduation stages. Option B is incorrect because the CNCF is not a standards body for cloud APIs; that is the role of other organizations. Option C is incorrect because the CNCF does not exclusively own Kubernetes; Kubernetes is a CNCF graduated project but governed by the community.

Option D is incorrect because the CNCF does not provide cloud infrastructure services; it supports open source projects but does not offer cloud services.

578
MCQeasy

What is the primary benefit of containers over virtual machines?

A.Containers provide stronger isolation than VMs
B.Containers use more disk space than VMs
C.Containers require a hypervisor to run
D.Containers are more portable and lightweight because they share the host OS kernel
AnswerD

Containers share the host kernel and only include the application and dependencies, making them portable and efficient.

Why this answer

Containers are more portable and lightweight than virtual machines because they share the host OS kernel, eliminating the need for a separate guest OS per instance. This shared kernel approach reduces resource overhead (CPU, memory, and disk) and enables faster startup times, as containers only package the application and its dependencies without duplicating the operating system.

Exam trap

The trap here is that candidates often confuse isolation strength with portability, assuming containers are more secure because they are lightweight, but for the CNCF KCNA exam, it's important to understand that VMs provide stronger isolation due to separate kernels and hypervisor-level boundaries, whereas containers are more portable and lightweight.

How to eliminate wrong answers

Option A is wrong because containers provide weaker isolation than VMs; VMs use a hypervisor to run separate guest OS kernels, offering stronger security boundaries, whereas containers rely on kernel namespaces and cgroups, which share the host kernel. Option B is wrong because containers use less disk space than VMs, as they do not include a full guest OS image and leverage layered filesystems (e.g., overlay2) to share common layers. Option C is wrong because containers do not require a hypervisor; they run directly on the host OS using container runtime engines like containerd or Docker, whereas VMs require a hypervisor (Type 1 or Type 2) to virtualize hardware.

579
MCQmedium

A team runs a stateless web application in Kubernetes. They have a Deployment named 'web-app' with 5 replicas. They want to ensure that a Service named 'web-svc' distributes traffic evenly to all healthy pods. Which type of Service should they use?

A.ClusterIP
B.Headless Service
C.ExternalName Service
D.NodePort
AnswerA

A ClusterIP Service exposes the application on a cluster-internal IP and load-balances across all pods in the backing set.

Why this answer

A ClusterIP Service is the correct choice because it provides a stable virtual IP address and round-robin load balancing across healthy pods in the Deployment. By default, kube-proxy uses iptables or IPVS rules to distribute traffic evenly to all ready pod endpoints, ensuring stateless web application requests are balanced without requiring external exposure.

Exam trap

The trap here is that candidates may think NodePort or Headless Service are needed for load balancing, but the question specifically asks for internal traffic distribution to pods, and ClusterIP is the default and correct Service type for that purpose, while Headless Service actually removes load balancing entirely.

How to eliminate wrong answers

Option B (Headless Service) is wrong because it does not provide a single virtual IP or load balancing; instead, it returns the IP addresses of all healthy pods via DNS, requiring the client to implement its own load balancing logic. Option C (ExternalName Service) is wrong because it maps the Service to an external DNS name (e.g., an external domain) and does not route traffic to any Kubernetes pods at all. Option D (NodePort) is wrong because it exposes the Service on a static port on each node's IP, which is used for external access and does not change the internal load balancing behavior (it still uses ClusterIP under the hood), but the question asks for the type that distributes traffic evenly to pods, and ClusterIP is the fundamental type for that purpose.

580
Multi-Selectmedium

Which TWO of the following are valid container runtimes that implement the CRI? (Choose two.)

Select 2 answers
A.Kata Containers
B.CRI-O
C.Docker
D.containerd
E.rkt
AnswersB, D

CRI-O is a CRI-compliant runtime.

Why this answer

CRI-O is a lightweight container runtime specifically designed to implement the Kubernetes Container Runtime Interface (CRI), allowing Kubernetes to use OCI-compliant runtimes directly without relying on Docker. It is a valid CRI implementation because it provides the gRPC-based CRI API server and manages container lifecycle using runc or Kata Containers as the underlying OCI runtime.

Exam trap

CNCF often tests the misconception that Docker is a CRI-compliant runtime because it was historically the default container runtime in Kubernetes, but candidates must remember that Docker uses its own API and was only supported via the now-removed dockershim, making containerd and CRI-O the only correct CRI implementations among the options.

581
MCQeasy

Which component is responsible for managing the lifecycle of containers on a Kubernetes node?

A.kube-scheduler
B.kube-controller-manager
C.kube-apiserver
D.kubelet
AnswerD

The kubelet runs on each node and ensures containers are running and healthy.

Why this answer

The kubelet is the primary node agent that runs on each Kubernetes node. It is responsible for ensuring that containers are running in a Pod as expected by interacting with the container runtime (e.g., Docker, containerd) to manage the container lifecycle—starting, stopping, and monitoring containers based on PodSpecs received from the API server.

Exam trap

CNCF often tests the distinction between control-plane components (scheduler, controller-manager, API server) and node-level agents (kubelet), so the trap here is assuming that container lifecycle management is a control-plane function rather than a node-level responsibility.

How to eliminate wrong answers

Option A is wrong because kube-scheduler is responsible for assigning Pods to nodes based on resource availability and constraints, not for managing container lifecycles on a node. Option B is wrong because kube-controller-manager runs controller processes (e.g., ReplicaSet, Deployment controllers) that regulate cluster state, but it does not directly interact with containers on individual nodes. Option C is wrong because kube-apiserver serves as the front-end for the Kubernetes control plane, exposing the Kubernetes API, but it does not manage container lifecycles on nodes; it only provides the interface for kubelet to retrieve Pod specifications.

582
MCQhard

In event-driven architecture, which pattern is commonly used to decouple producers and consumers, allowing asynchronous communication?

A.Event broker (message queue or event bus)
B.Shared database
C.Circuit breaker pattern
D.Synchronous REST API calls
AnswerA

An event broker decouples producers and consumers by acting as an intermediary.

Why this answer

Event-driven architecture decouples producers and consumers via an event broker (e.g., message queue or event bus), enabling asynchronous communication. Direct synchronous calls would couple them.

583
Multi-Selecthard

Which TWO statements about the Container Runtime Interface (CRI) are correct? (Select 2)

Select 2 answers
A.Docker is the primary CRI implementation
B.CRI is responsible for pulling container images
C.CRI allows Kubernetes to use different container runtimes
D.CRI is an OCI specification
E.containerd and CRI-O are CRI-compliant runtimes
AnswersC, E

CRI is a plugin interface that abstracts the container runtime.

Why this answer

The Container Runtime Interface (CRI) is a plugin interface that enables kubelet to use a variety of container runtimes without needing to recompile Kubernetes. It defines the API between kubelet and the container runtime, allowing runtimes like containerd and CRI-O to be swapped in seamlessly. This abstraction decouples Kubernetes from any single runtime, enabling flexibility and vendor neutrality.

Exam trap

The trap here is that candidates confuse CRI with OCI or assume Docker is still the default CRI implementation, when in fact Docker is not CRI-compliant and was removed as a built-in runtime in Kubernetes 1.24.

584
Multi-Selecthard

Which TWO of the following are features of ArgoCD that support GitOps principles?

Select 2 answers
A.Automatic secret management
B.Health status visualization of applications
C.Built-in template engine for generating manifests
D.Automated sync to desired state defined in Git
E.Self-healing by reverting manual changes
AnswersB, D

ArgoCD provides health status visualization of applications, which helps monitor drift and application state, supporting GitOps principles.

Why this answer

ArgoCD supports GitOps by automatically syncing the cluster to the desired state defined in Git (option D) and providing health status visualization (option B) to monitor applications. Option A is incorrect because ArgoCD does not manage secrets automatically; it relies on external tools like SealedSecrets or external secret operators. Option C is incorrect because ArgoCD does not have a built-in template engine; it delegates manifest generation to tools like Kustomize or Helm.

Option E is incorrect because while ArgoCD can be configured for self-healing, it is not a standalone feature; self-healing is a behavior that results from the automated sync (option D) and is not a separate feature listed in the core capabilities.

585
Multi-Selectmedium

Which TWO tools are commonly used for GitOps? (Choose two.)

Select 2 answers
A.Flux
B.Jenkins
C.Helm
D.Terraform
E.ArgoCD
AnswersA, E

Flux is a GitOps operator for Kubernetes.

Why this answer

ArgoCD and Flux are two popular GitOps tools that automate deployment of applications from Git repositories.

586
Multi-Selecthard

Which TWO are benefits of using a service mesh in cloud-native applications?

Select 2 answers
A.Eliminates need for application monitoring
B.Advanced traffic management capabilities
C.Simplified persistent storage management
D.Automatic mTLS encryption between services
E.Reduced network latency
AnswersB, D

Traffic routing, retries, etc.

Why this answer

A service mesh provides advanced traffic management capabilities such as fine-grained routing, canary deployments, and circuit breaking through sidecar proxies (e.g., Envoy). These capabilities allow operators to control traffic flow between microservices without modifying application code, enabling resilient and observable communication patterns.

Exam trap

CNCF often tests the misconception that a service mesh reduces latency or replaces monitoring, when in fact it adds a small overhead and complements, rather than replaces, existing monitoring tools.

587
Multi-Selectmedium

Which THREE of the following are characteristics of a microservices architecture? (Select 3)

Select 3 answers
A.Services share the same database schema
B.Loose coupling between services
C.Independent deployment of services
D.All services are packaged in a single monolithic deployment
E.Decomposition of application into small, independent services
AnswersB, C, E

Services communicate via APIs, reducing dependencies.

Why this answer

Microservices architecture emphasizes loose coupling, where each service communicates via well-defined APIs (e.g., REST, gRPC) and does not share internal implementation details. This allows services to evolve independently without affecting others, which is a core principle of the architecture.

Exam trap

CNCF often tests the misconception that microservices share a database or are deployed as a single unit, confusing them with monolithic or service-oriented architectures (SOA) that may share schemas.

588
Drag & Dropmedium

Drag and drop the steps to configure a Kubernetes Service of type LoadBalancer in a cloud environment into the correct order.

Drag steps to the numbered slots on the right, or tap a step then tap a slot.

Steps
Order
1Step 1
2Step 2
3Step 3
4Step 4

Why this order

First deploy the app, then define and create the LoadBalancer service, retrieve the IP, and access it.

589
MCQhard

You have a Deployment defined with replicas: 5. You run 'kubectl scale deployment myapp --replicas=3'. Which component is responsible for ensuring the actual number of Pods matches the desired 3?

A.etcd
B.Deployment controller in kube-controller-manager
C.kubelet
D.kube-scheduler
AnswerB

The Deployment controller watches the Deployment and manages the ReplicaSet to achieve the desired number of replicas.

Why this answer

The Deployment controller, which runs as part of the kube-controller-manager, is responsible for reconciling the desired state of a Deployment. When you run 'kubectl scale deployment myapp --replicas=3', the Deployment controller detects the change in the Deployment's replica count and creates or deletes Pods via the ReplicaSet controller to match the desired 3 replicas.

Exam trap

CNCF often tests the misconception that kubelet or kube-scheduler handles scaling, when in fact kubelet only manages local Pod lifecycle and the scheduler only places Pods on nodes, while the Deployment controller in the kube-controller-manager is the component that reconciles replica counts.

How to eliminate wrong answers

Option A is wrong because etcd is a distributed key-value store that holds cluster state, but it does not perform reconciliation or enforce desired replica counts; it only stores the data that controllers read and write. Option C is wrong because kubelet is an agent that runs on each node and manages Pods on that node, but it does not scale Deployments or manage replica counts across the cluster. Option D is wrong because kube-scheduler is responsible for assigning Pods to nodes based on resource availability and constraints, not for ensuring the number of Pods matches a desired replica count.

590
Multi-Selecthard

Which TWO of the following are true about Pod resource limits? (Select TWO)

Select 2 answers
A.A container can use more memory than its limit if the node has free memory
B.CPU limits are enforced using CFS quotas
C.Memory limits are soft and can be exceeded temporarily
D.Limits must be greater than or equal to requests
E.Setting CPU limits guarantees that a container will always get that much CPU
AnswersB, D

CPU limits are enforced via Completely Fair Scheduler (CFS) quotas.

Why this answer

Kubernetes enforces CPU limits using Completely Fair Scheduler (CFS) quotas. When a CPU limit is set, the kubelet configures the container's cgroup `cpu.cfs_quota_us` parameter, which restricts the total CPU time the container can consume over a CFS period (default 100ms). This ensures the container cannot exceed its specified CPU limit, even if the node has idle CPU resources.

Exam trap

In Kubernetes, the trap here is that candidates often confuse memory limits (hard, enforced by OOM kill) with CPU limits (hard, enforced by throttling), or mistakenly think limits are soft guarantees of allocation rather than caps on consumption.

591
MCQmedium

A team wants to deploy a batch job that runs once to process a large dataset. The job should run to completion and then terminate. Which Kubernetes resource should be used?

A.DaemonSet
B.CronJob
C.Deployment
D.Job
AnswerD

Job runs pods until completion, ideal for batch processing.

Why this answer

A Job resource is designed for batch processing tasks that run to completion and then terminate. It creates one or more Pods and ensures they successfully finish their work, making it the correct choice for a one-time data processing job.

Exam trap

CNCF often tests the distinction between long-running workloads (Deployments, DaemonSets) and finite tasks (Jobs), so the trap here is confusing a one-time batch job with a CronJob due to the word 'batch' or assuming a Deployment can handle termination.

How to eliminate wrong answers

Option A is wrong because a DaemonSet ensures a Pod runs on every node (or a subset) for continuous daemon-like services, not for a one-time batch job. Option B is wrong because a CronJob is used for scheduled, recurring tasks, not a single run. Option C is wrong because a Deployment manages long-running, stateless applications with desired replicas and rolling updates, not a terminating batch job.

592
MCQeasy

What is the primary purpose of continuous integration (CI) in a cloud-native application delivery pipeline?

A.To automatically build and test code changes upon commit
B.To manage infrastructure provisioning
C.To manage container images and registries
D.To automatically deploy code changes to production
AnswerA

This is correct. CI automates building and testing code changes upon commit to catch integration issues early.

Why this answer

CI automates building and testing code changes upon commit to catch integration issues early. Option A correctly describes this. Option B refers to infrastructure provisioning, which is typically managed by Infrastructure as Code (IaC) tools.

Option C refers to managing container images and registries, which is part of container management. Option D describes continuous deployment (CD), which automatically deploys code to production after passing CI.

593
MCQmedium

You need to update a running Deployment to use a new container image. Which kubectl command should you use?

A.kubectl replace -f deployment.yaml
B.kubectl set image deployment/<name> <container>=<new-image>
C.kubectl edit deployment <name>
D.kubectl patch deployment <name> -p '{"spec":{"template":{"spec":{"containers":[{"name":"<container>","image":"<new-image>"}]}}}}'
AnswerB

This command directly updates the image.

Why this answer

`kubectl set image` is the dedicated command for updating the container image of a running Deployment without modifying the entire manifest. It directly updates the Deployment's pod template spec, triggering a rolling update to replace pods with the new image.

Exam trap

CNCF often tests whether candidates know that `kubectl set image` is the idiomatic, single-purpose command for updating container images, versus using more complex or less appropriate commands like `kubectl replace` or `kubectl patch`.

How to eliminate wrong answers

Option A is wrong because `kubectl replace -f deployment.yaml` would replace the entire Deployment object, which is not the standard way to update just the image; it requires a complete YAML file and can cause downtime if not handled carefully. Option C is wrong because `kubectl edit deployment <name>` opens an interactive editor, which is not a single command for automation and can introduce human error or syntax issues. Option D is wrong because `kubectl patch` can technically update the image, but it requires a complex JSON patch string and is more error-prone than the simpler `kubectl set image` command; it is not the recommended or most straightforward approach for this common task.

594
Multi-Selectmedium

Which TWO of the following are benefits of using Helm for managing Kubernetes applications?

Select 2 answers
A.Automatic scaling of pods based on CPU usage
B.Native integration with service mesh for traffic splitting
C.Templating engine for parameterizing Kubernetes manifests
D.Ability to perform rollbacks to previous releases
E.Built-in support for canary deployments
AnswersC, D

Helm uses Go templates to create reusable charts.

Why this answer

Helm provides templating for reusable configurations and allows for easy rollback to previous releases.

595
MCQmedium

Which of the following is an example of Infrastructure as Code (IaC) tool?

A.Kubernetes
B.Terraform
C.Docker
D.Prometheus
AnswerB

Terraform is a declarative IaC tool for provisioning infrastructure.

Why this answer

Terraform is a widely used IaC tool that allows declarative definition of infrastructure across multiple cloud providers.

596
MCQmedium

What is the concept of 'immutable infrastructure' as applied to Kubernetes?

A.Configuration is stored in environment variables only
B.Containers are rebuilt from the same base image every time
C.Infrastructure components are never replaced; they are updated in place
D.Pods are replaced with new versions rather than being modified
AnswerD

Correct. Immutable infrastructure replaces rather than patches.

Why this answer

Immutable infrastructure in Kubernetes means that instead of modifying running Pods or their containers (e.g., patching a binary or updating a config file in place), you replace the entire Pod with a new version. This is enforced by Kubernetes' declarative model: when you update a Deployment's Pod template, the controller creates new Pods with the new image and terminates the old ones. This ensures consistency, repeatability, and eliminates configuration drift, as every change results in a fresh, identical instance from the same image.

Exam trap

CNCF often tests the distinction between 'immutable' (replace) and 'mutable' (update in place), and the trap here is that candidates confuse the concept with build-time practices (like using the same base image) or configuration injection methods, rather than the core runtime behavior of replacing Pods.

How to eliminate wrong answers

Option A is wrong because storing configuration only in environment variables is a specific pattern (e.g., 12-factor app), but it does not define immutability; immutable infrastructure requires replacing the entire unit, not just how config is injected. Option B is wrong because rebuilding containers from the same base image every time describes a build practice (e.g., using Dockerfile layers), but immutability is about the runtime behavior of replacing Pods, not the image build process. Option C is wrong because it describes mutable infrastructure (e.g., SSHing into a server to apply updates), which is the exact opposite of immutability; immutable infrastructure mandates that components are never updated in place—they are destroyed and recreated.

597
Multi-Selecthard

Which THREE of the following are true about the Open Container Initiative (OCI)? (Choose 3)

Select 3 answers
A.Docker is an OCI runtime specification
B.OCI is governed by the Cloud Native Computing Foundation (CNCF)
C.OCI defines both an image spec and a runtime spec
D.containerd is an OCI-compliant container runtime
E.Docker images are OCI-compliant
AnswersC, D, E

The OCI maintains the Image Specification and Runtime Specification.

Why this answer

The OCI defines the image spec and runtime spec, ensuring interoperability between container tools. containerd is an OCI-compliant runtime. Docker images are OCI-compliant. Docker itself is not a runtime spec but a platform that uses runtimes.

598
MCQmedium

A company wants to run a batch job that processes data and then terminates. Which Kubernetes resource should they use?

A.CronJob
B.Job
C.Deployment
D.DaemonSet
AnswerB

Jobs create one or more pods and ensure they successfully terminate, ideal for batch processing.

Why this answer

A Job is the correct Kubernetes resource for a batch job that processes data and then terminates. Unlike controllers that maintain a desired state (like Deployments), a Job creates one or more Pods and ensures they run to successful completion. Once the specified number of Pods terminate successfully, the Job is considered complete and does not restart the Pods, making it ideal for one-off or finite processing tasks.

Exam trap

CNCF often tests the distinction between controllers that maintain a desired state (Deployment, DaemonSet) versus controllers that run to completion (Job, CronJob), and the trap here is that candidates may confuse a CronJob with a Job, forgetting that CronJob adds a scheduling layer for periodic execution, not for a single run.

How to eliminate wrong answers

Option A is wrong because a CronJob is designed for scheduling recurring tasks on a time-based schedule (e.g., every hour), not for a single batch job that runs once and terminates. Option C is wrong because a Deployment is meant to run a set of Pods continuously, ensuring a specified number of replicas are always running; it will restart Pods if they exit, which is the opposite of a terminating batch job. Option D is wrong because a DaemonSet ensures that a copy of a Pod runs on every (or selected) node in the cluster, typically for long-running system services like log collectors or monitoring agents, not for one-off batch processing.

599
MCQhard

When using Kustomize, how do you apply a common label to all resources in the base?

A.By editing each YAML file individually
B.By setting 'commonLabels' in the kustomization.yaml
C.By using the 'patches' field to add labels
D.By using a Helm chart instead of Kustomize
AnswerB

commonLabels is designed for this purpose.

Why this answer

Kustomize's commonLabels field adds labels to all resources, including selectors.

600
MCQmedium

You need to expose a set of pods running a web application to internal cluster traffic on a stable IP address. Which resource should you create?

A.Service of type NodePort
B.Ingress
C.NetworkPolicy
D.Service of type ClusterIP
AnswerD

Why this answer

A Service of type ClusterIP exposes the set of pods on a stable, internal IP address that is only reachable within the cluster. This is the default Service type and is specifically designed for internal cluster traffic, providing a stable virtual IP (VIP) that load-balances requests to the underlying pods.

Exam trap

CNCF often tests the distinction between internal and external exposure, and the trap here is that candidates may confuse a Service of type ClusterIP with NodePort, thinking NodePort is needed for any stable IP, when ClusterIP is the correct choice for internal-only traffic.

How to eliminate wrong answers

Option A is wrong because a Service of type NodePort exposes the service on a static port on each node's IP address, making it accessible from outside the cluster, not just internally. Option B is wrong because an Ingress is an API object that manages external HTTP/HTTPS access to services, typically requiring a Service of type NodePort or LoadBalancer to route traffic, and does not itself provide a stable internal IP. Option C is wrong because a NetworkPolicy is a security resource that controls ingress and egress traffic to/from pods based on labels and ports, but it does not expose pods or provide a stable IP address.

Page 7

Page 8 of 12

Page 9