Exam Information
Free practice questions with explanations
Linux Foundation CKAD Practice Questions
Answer a question to see the correct answer and the explanation, or click Show answer. Newest questions first.
- Questions
- 15
- Answered
- 0
- Correct
- 0
- Score
- -
-
1 Question 1 Single choice Application Deployment
A payments team runs a Deployment named ledger-api with 6 replicas behind a Service. They need to shift traffic gradually to a new version without a full cutover, keeping total cost near the current level and avoiding a second full set of Pods. The cluster has no service mesh or Argo Rollouts installed, and the change window forbids cluster-wide controller installs. Which approach best meets these requirements?
Correct Answer: AExplanationA Service distributes requests across all ready Pods matching its selector, so running two Deployments that share a common label gives a proportional split by replica count. Scaling the old and new Deployments in step lets you move traffic gradually with no extra controllers. Setting maxSurge to 100 percent doubles the Pod count temporarily, which breaks the cost constraint, and it is still a single rollout rather than a traffic split. The canary annotation approach requires an Ingress controller that supports it and the stem rules out extra installs, while Recreate causes downtime and is not gradual at all.
-
2 Question 2 Single choice Application Design and Build
A logging agent must run on every worker node, and a nightly report job must run once per day at 02:00 with a history of the last three successful runs kept. A developer proposes using a Deployment with one replica for the agent and a Job created by a shell loop for the report. Which combination of workload resources is the most appropriate?
Correct Answer: AExplanationA DaemonSet schedules one Pod on each eligible node, which matches the per-node agent requirement and stays correct as nodes are added. A CronJob handles the 02:00 schedule natively, and successfulJobsHistoryLimit controls how many completed successful Jobs are retained. Using a Deployment with affinity does not guarantee exactly one Pod per node. The StatefulSet is designed for stable identities, not node coverage, and concurrencyPolicy does not control history. The Job with ttlSecondsAfterFinished cannot schedule itself daily and deletes history after a time window rather than keeping a count.
-
3 Question 3 Single choice Application Design and Build
A team is adding a service that must fetch a configuration bundle from a remote endpoint before the main container starts, and must also ship a log-forwarding container that reads files written by the main application. The main container needs to see the fetched bundle at /config and the log files through a shared directory. Which Pod design meets these needs most cleanly?
Correct Answer: BExplanationInit containers run to completion, in order, before regular containers start, which guarantees the bundle exists before the application begins. A sidecar running alongside the main container in the same Pod shares volumes, so the emptyDir provides a clean handoff for logs. Two regular containers do not guarantee ordering, so the fetch could race the application start. Combining everything into one container violates the single-process-per-container pattern. A hostPath volume ties data to a node and creates security and portability issues that the stem's design intent avoids.
-
4 Question 4 Single choice Application Environment, Configuration and Security
A platform team stores a database password in a Secret named db-creds and wants a Pod to read it as the environment variable DB_PASSWORD. Security policy also requires the password never be visible in the Pod spec, in kubectl describe output, or in shell history, and that the Pod can only read this one key. Which approach best satisfies these constraints?
Correct Answer: AExplanationA secretKeyRef inside an env entry pulls only the named key at container start, so the Pod spec contains a reference rather than the value. This also limits exposure to one key, unlike envFrom or a whole-Secret volume which would expose every key. ConfigMaps are not encrypted at rest by default and are not meant for credentials. Hardcoding a plain value puts the secret directly in the spec, and a NetworkPolicy does not affect who can read the manifest.
-
5 Question 5 Single choice Application Environment, Configuration and Security
A developer has deployed a web application whose Pods are being rescheduled and killed repeatedly. Inspection shows the containers have memory limits of 256Mi, and the application's steady-state usage is about 180Mi with brief spikes to 300Mi during batch processing. The team wants Pods to be scheduled reliably and to avoid being the first evicted under node pressure, while still capping runaway growth. Which resource configuration is most appropriate?
Correct Answer: AExplanationRequests drive scheduling, and a request near steady-state usage keeps the Pod placed on a node with real capacity. A limit above the spikes stops the OOM kills seen with the 256Mi cap, while still bounding growth. Setting both to 300Mi would technically give Guaranteed QoS, but it wastes reserved capacity and the spikes are a stated range, so it is not the most sensible choice. Removing requests yields BestEffort QoS, the first to be evicted. A request greater than the limit is rejected by the API server.
-
6 Question 6 Single choice Application Environment, Configuration and Security
A cluster operator wants a CI pipeline's ServiceAccount to read ConfigMaps only in the release namespace and to be unable to read Secrets anywhere. The pipeline currently uses the default ServiceAccount, which has been granted a ClusterRoleBinding to cluster-admin by a previous engineer. The operator must remove the excess privilege and ensure the pipeline keeps working. Which set of actions should be taken?
Correct Answer: AExplanationA dedicated ServiceAccount with a namespaced Role and RoleBinding confines access to configmaps in one namespace, and removing the cluster-admin binding eliminates the excess privilege. Pods must reference the new ServiceAccount through serviceAccountName to use it. Leaving the cluster-admin binding in place keeps the default account overprivileged, which violates the requirement. A ClusterRoleBinding grants access across all namespaces, exceeding the release-only scope. Deleting the default ServiceAccount is not how Kubernetes works, since the controller recreates it, and RBAC does not filter by labels.
-
7 Question 7 Single choice Application Observability and Maintenance
A team is upgrading a cluster from v1.24 to v1.30. Their CI pipeline applies manifests that still use the policy/v1beta1 PodSecurityPolicy resource and the networking.k8s.io/v1beta1 Ingress API. Deployments are failing validation after the upgrade. The team needs to find every affected manifest before the next release and update them with minimal risk. What should they do first?
Correct Answer: BExplanationFinding deprecated apiVersion references in the source manifests and migrating them to supported versions addresses the root cause, and a server-side dry-run confirms each replacement is accepted by the new API server. Disabling validation hides the failure rather than fixing it and can push invalid objects. Downgrading the cluster is unnecessary because the upgrade is already the goal. Editing live objects with kubectl edit does not change how the API serves them, and apiVersion cannot be altered that way on existing objects.
-
8 Question 8 Single choice Application Observability and Maintenance
A checkout service sometimes returns 503 responses for a few seconds after a Pod restarts, even though the process is running. The container's HTTP server takes about 15 seconds to load its product cache before it can serve requests, and the Pod is receiving traffic immediately after it starts. The team wants traffic held back until the cache is ready and a wedged process to be restarted automatically. Which configuration achieves both goals?
Correct Answer: BExplanationA readinessProbe controls whether a Pod is included in Service endpoints, so a probe on the cache-ready endpoint holds traffic back until it passes. A livenessProbe on a separate endpoint restarts the container only when it is actually wedged. Using the cache endpoint as a liveness check would restart the container during slow warm-up, which is a common mistake. A liveness probe alone does not remove traffic. A startupProbe delays liveness and readiness checks but does not by itself remove a Pod from Service endpoints while running in the way the stem needs.
-
9 Question 9 Multiple choice Services and Networking
A namespace named shop contains a Deployment called cart with Pods labeled app=cart. Its Service cart-svc does not return responses to clients in the namespace frontend, and kubectl get endpoints cart-svc shows no addresses. The team must fix access without exposing cart to other namespaces. Which TWO actions are correct? (Choose two.)
Correct Answer: A, EExplanationAn empty endpoints object means the Service selector matched no Pods that were eligible, so checking the selector against the Pod labels is the first diagnostic step. Pods also need to pass their readiness probes, because not-ready Pods are excluded from endpoints. A LoadBalancer type exposes the service externally and violates the no-external-exposure constraint. Allowing ingress from all namespaces broadens exposure beyond the requirement. An Ingress does not fix empty endpoints and adds an external routing path that is unnecessary.
-
10 Question 10 Single choice Services and Networking
A namespace named orders runs a default-deny NetworkPolicy for ingress. A Deployment named api serves on port 8080 and must accept traffic only from Pods labeled role=gateway in the namespace edge, plus cluster DNS lookups from its own Pods to the kube-dns service in kube-system. A teammate has written a single policy that allows ingress from namespace edge and allows egress to UDP and TCP port 53 on all destinations. Which change makes the policy correct?
Correct Answer: AExplanationWithin one from or to entry, a namespaceSelector and podSelector together form an AND, which matches gateway Pods only in the edge namespace. Splitting them into separate entries creates an OR and admits every Pod in edge. Restricting egress DNS to kube-system DNS Pods, rather than all destinations, satisfies the scope limit. A NetworkPolicy is namespaced and applies to Pods in its own namespace, so placing it in kube-system is wrong. NetworkPolicies do select by namespace labels, so an ipBlock is unnecessary.
-
11 Question 11 Multiple choice Services and Networking
A team exposes a web application through an Ingress named storefront with host shop.example.com, routing / to a Service named web on port 80. After applying the Ingress, requests return 404 from the controller. The Service web exists and has endpoints. The cluster runs an NGINX Ingress controller, and the Ingress uses the networking.k8s.io/v1 API. Which TWO checks or fixes address likely causes? (Choose two.)
Correct Answer: B, DExplanationAn Ingress is only acted on by a controller that claims it, which happens through ingressClassName or a default IngressClass, so a missing class binding produces a non-routing result. Host-based rules also require the request to carry the matching Host header. Ingress controllers route to Service endpoints, so ClusterIP is the normal target and converting to NodePort is unnecessary. Ingress traffic is not blocked by default, and the stated symptom of 404 from the controller points to routing matching, not Pod-level denial.
-
12 Question 12 Single choice Application Deployment
A Deployment named inventory runs version 2.3 with 8 replicas. A release manager needs to roll out version 2.4 with the guarantee that no more than 2 Pods are unavailable at any point and that at most 2 extra Pods run during the rollout, because the cluster is near its capacity limit. The rollout must also be pausable for a manual check. Which Deployment strategy configuration and command sequence meets these needs?
Correct Answer: CExplanationmaxUnavailable and maxSurge bound how many Pods are down or extra during a RollingUpdate, and they must be set exactly as the release manager specified. kubectl rollout pause halts further progression so the team can verify, and kubectl rollout resume continues it. Recreate removes all Pods before starting new ones, breaking the unavailability limit. Setting maxUnavailable to 0 with maxSurge 4 exceeds the surge constraint, and scaling does not pause a rollout. Deleting the old ReplicaSet bypasses the controlled rollout entirely.
-
13 Question 13 Single choice Application Design and Build
A team is writing a Dockerfile for a Go service. The build stage needs the full Go toolchain, but the final image should be small and contain no build tools, and it must run as a non-root user. The container listens on port 8443 and reads its config from a mounted volume. Which Dockerfile approach best meets these requirements?
Correct Answer: CExplanationA multi-stage build compiles in a full toolchain image and copies only the resulting binary into a minimal runtime image, which keeps build tools out of the final artifact. Setting USER to a non-root UID satisfies the security requirement. Keeping the golang base for runtime leaves the toolchain in the image and the RUN rm does not reduce image layers. Copying the toolchain across defeats the purpose, and running as root violates the requirement. Running as root on scratch also fails the non-root requirement.
-
14 Question 14 Single choice Application Design and Build
A data team runs a stateful analytics service in Kubernetes and needs a volume that persists across Pod restarts and is available to a replacement Pod scheduled on a different node. The storage team has provisioned a StorageClass that uses dynamic provisioning with network-attached block storage. The workload runs one replica with ReadWriteOnce access. Which approach best meets the requirement?
Correct Answer: CExplanationA PersistentVolumeClaim requests storage through a StorageClass, and dynamic provisioning creates a volume that can follow the Pod, which matches the reschedule requirement. ReadWriteOnce means the volume attaches to one node at a time, which fits a single replica. emptyDir data is removed when the Pod is deleted, and memory-backed emptyDir is node-local. hostPath is tied to one node and does not move with the Pod. Projected volumes expose configuration data and do not offer persistent storage.
-
15 Question 15 Single choice Application Environment, Configuration and Security
A security team requires a Pod running a log shipper to drop all Linux capabilities, prevent privilege escalation, run with a read-only root filesystem, and run as UID 10001. The log shipper needs to write to /var/log/shipper, which is mounted from an emptyDir volume. The Pod currently fails with permission errors on startup. Which securityContext configuration satisfies all requirements?
Correct Answer: CExplanationDropping ALL capabilities, disabling privilege escalation, and enabling a read-only root filesystem are the hardening controls the team asked for, while the emptyDir mount provides the one writable path. Running as UID 10001 with a matching volume ownership or fsGroup resolves permission errors without weakening the Pod. Privileged mode violates the drop-all and escalation requirements. Adding SYS_ADMIN grants a broad capability that the team explicitly removes. Running as root contradicts the UID requirement and does not address the other controls.
These are 15 of the 48 questions in the full CKAD pack.
Get All 48 QuestionsGet all 48 questions & answers
Full access options for Linux Foundation CKAD
Self-study
PDF Version
- 48 actual exam questions
- Compatible with all devices
- Printable PDF format
- No download limits
- 90 days free updates
- 24/7 customer support
Best value
Bundle Pack
- Discounted PDF + online access
- 48 actual exam questions
- Both PDF and online practice test
- Free 90 days updates
- No download or practice limits
- 24/7 customer support
Exam simulation
Online Practice Test
- 48 actual exam questions
- Actual exam environment
- 90 days free updates
- Browser-based software
- 24/7 customer support
100% Money Back Guarantee
Your success comes first
At DumpsProvider, we give you a 100% money back guarantee on all of our exam dumps. For us, your success is the #1 priority and we are more than confident that our exam material will help you pass the CKAD Exam (Certified Kubernetes Application Developer) on your very first attempt.
In a rare case, if you fail your exam, we will refund your amount without asking a single question.