Free practice · No sign-up required

Certified Kubernetes Application Developer free practice test

15 questions with answer explanations. Choose an answer below to begin.

Question 1 of 15

Which resource is used to define how to run a single container process in Kubernetes?

Show hint

Understand core workload resources and their purposes.

0/15 answered · Bookmark questions to review later. Focus the practice area to use keys 1–9 and Enter.

Learn by doing

Put your answers into practice

Use official documentation and hands-on labs to work through topics you missed.

Explore all study resources →
Kubernetes application examples

Application examples from the Kubernetes project for practicing manifests and application behavior in a cluster.

Try it: Use a disposable cluster. Read a simple application's manifests, predict which Pods its Service selects, then change a label and use kubectl to diagnose the resulting connectivity problem.

Source is free. A local cluster uses your computer; hosted clusters may incur charges.

Kubernetes official tutorials

Guided tutorials for learning Kubernetes behavior and building practical skills beyond multiple-choice recall.

Try it: Complete a basic application tutorial. Repeat the task without the walkthrough, then explain the difference between declared configuration and observed cluster state.

Documentation is free. Your chosen cluster environment may have costs.

All questions and explanations

Prefer to read at your own pace? Work through each question below, then open its answer to check your reasoning. You can link directly to a question or print this reference.

  1. Which resource is used to define how to run a single container process in Kubernetes?

    1. Pod

    2. Deployment

    3. Service

    4. ConfigMap

    Show answer and explanation

    Correct answer

    • Pod

    A Pod is the smallest deployable unit in Kubernetes and defines how to run one or more containers. It is the basic execution unit for containerized applications.

  2. Which command retrieves the logs from a running container in a Pod?

    1. kubectl logs

    2. kubectl describe

    3. kubectl get

    4. kubectl exec

    Show answer and explanation

    Correct answer

    • kubectl logs

    The kubectl logs command is used to fetch logs from a container inside a Pod. It supports retrieving logs from a single container or all containers in the Pod.

  3. What is the purpose of a Kubernetes Service of type ClusterIP?

    1. Exposes the service internally within the cluster

    2. Exposes the service externally via a cloud provider load balancer

    3. Exposes the service on a static port on each node

    4. Exposes the service to the internet via DNS

    Show answer and explanation

    Correct answer

    • Exposes the service internally within the cluster

    ClusterIP is the default service type and provides a stable internal IP address for communication within the cluster. It is not reachable from outside the cluster.

  4. Which resource definition allows you to inject environment variables from a ConfigMap into a container?

    1. envFrom

    2. volumeMounts

    3. livenessProbe

    4. securityContext

    Show answer and explanation

    Correct answer

    • envFrom

    The envFrom field in a container specification can reference a ConfigMap to inject all its keys as environment variables. This helps manage configuration without changing container images.

  5. What is the main difference between a ReplicaSet and a Deployment?

    1. Deployment provides declarative updates to Pods, while ReplicaSet does not

    2. ReplicaSet supports rolling updates, while Deployment does not

    3. Deployment manages network policies, while ReplicaSet manages storage

    4. ReplicaSet is used for stateful workloads, while Deployment is for batch jobs

    Show answer and explanation

    Correct answer

    • Deployment provides declarative updates to Pods, while ReplicaSet does not

    A Deployment is a higher-level controller that manages ReplicaSets and provides declarative updates, rollbacks, and scaling for Pods. ReplicaSet ensures a specified number of pod replicas are running.

  6. Which kubectl command helps you debug connectivity issues between Pods?

    1. kubectl run

    2. kubectl debug

    3. kubectl describe

    4. kubectl port-forward

    Show answer and explanation

    Correct answer

    • kubectl debug

    kubectl debug allows you to create debugging containers alongside an existing Pod to inspect networking and filesystem issues. It is useful for troubleshooting connectivity and configuration problems.

  7. What does a readiness probe determine?

    1. Whether the container is healthy and should receive traffic

    2. Whether the container has started successfully

    3. Whether the node has enough resources

    4. Whether the Pod should be restarted

    Show answer and explanation

    Correct answer

    • Whether the container is healthy and should receive traffic

    A readiness probe indicates whether a container is ready to accept traffic. If it fails, the Pod is removed from Service endpoints until it passes.

  8. Which field in a Pod spec defines resource requests and limits?

    1. resources

    2. spec

    3. containers

    4. limits

    Show answer and explanation

    Correct answer

    • resources

    The resources field under a container specification defines requests and limits for CPU and memory. This helps the scheduler make placement decisions and manage resource usage.

  9. What is the role of a PersistentVolumeClaim in Kubernetes?

    1. It requests storage resources on behalf of a Pod

    2. It formats the underlying disk device

    3. It defines network policies for storage traffic

    4. It creates a backup of container data

    Show answer and explanation

    Correct answer

    • It requests storage resources on behalf of a Pod

    A PersistentVolumeClaim is a request for storage by a user. It allows Pods to consume persistent storage without knowing the details of the underlying storage infrastructure.

  10. Question 10

    Link to question

    Which Kubernetes object is used to store sensitive information such as passwords?

    1. Secret

    2. ConfigMap

    3. Volume

    4. Environment

    Show answer and explanation

    Correct answer

    • Secret

    Secrets are designed to hold sensitive data like passwords, tokens, and keys. They are base64-encoded and stored separately from Pod definitions to improve security.

  11. Question 11

    Link to question

    What is the purpose of a liveness probe?

    1. To determine if a container should be restarted

    2. To expose the container to external traffic

    3. To set resource limits for the container

    4. To mount a persistent volume

    Show answer and explanation

    Correct answer

    • To determine if a container should be restarted

    A liveness probe checks if a container is still running. If it fails, the kubelet restarts the container. It helps recover from deadlocks or unhealthy states.

  12. Question 12

    Link to question

    Which resource is best suited for running a batch job that completes after processing a queue?

    1. Job

    2. Deployment

    3. DaemonSet

    4. StatefulSet

    Show answer and explanation

    Correct answer

    • Job

    A Job is designed to run one or more pods to completion, making it ideal for batch processing tasks. It ensures the specified number of Pods successfully terminate.

  13. Question 13

    Link to question

    What does a NodePort service do?

    1. Exposes the service on a static port on each cluster node

    2. Routes traffic based on DNS names

    3. Provides an internal load balancer

    4. Restricts access to specific IP ranges

    Show answer and explanation

    Correct answer

    • Exposes the service on a static port on each cluster node

    A NodePort service opens a specific port on all nodes in the cluster and forwards traffic to the service. It allows external access using :.

  14. Question 14

    Link to question

    Which command is used to apply a configuration file to create or update resources?

    1. kubectl apply

    2. kubectl create

    3. kubectl run

    4. kubectl replace

    Show answer and explanation

    Correct answer

    • kubectl apply

    kubectl apply performs a declarative update of resources by comparing the configuration file with the live state and reconciling differences. It is the recommended way to manage configurations.

  15. Question 15

    Link to question

    What is the primary use of an init container?

    1. To run setup or utility tasks before the main application starts

    2. To replace the main container if it crashes

    3. To monitor the main container's performance

    4. To provide network connectivity to the Pod

    Show answer and explanation

    Correct answer

    • To run setup or utility tasks before the main application starts

    Init containers run to completion before the main application containers start. They are useful for tasks like loading configuration, waiting for dependencies, or preparing data.

Read all flashcards

Recall the answer before opening each card.

What is the smallest deployable unit in Kubernetes?

A Pod. It defines how to run one or more containers and is the basic execution unit for containerized applications.

Which command fetches logs from a container in a Pod?

kubectl logs. It retrieves logs from a single container or all containers in a Pod.

What is the default service type that exposes a service internally?

ClusterIP. It provides a stable internal IP reachable only within the cluster.

How can you inject all keys from a ConfigMap as environment variables?

Use the envFrom field in the container spec referencing the ConfigMap. It injects all key-value pairs as environment variables.

What is the main advantage of a Deployment over a ReplicaSet?

Deployment provides declarative updates, rollbacks, and scaling. ReplicaSet only ensures a specified number of pods are running.

Which command creates a debugging container alongside an existing Pod?

kubectl debug. It adds a temporary container to help inspect networking and filesystem issues.

What does a readiness probe determine?

Whether the container is ready to accept traffic. If it fails, the Pod is removed from Service endpoints.

Where are resource requests and limits defined in a Pod spec?

Under the resources field within the container specification. It includes CPU and memory requests and limits.

What is the role of a PersistentVolumeClaim?

It requests storage resources on behalf of a Pod, abstracting the underlying storage infrastructure.

Which Kubernetes object stores sensitive data like passwords?

Secret. It holds sensitive information base64-encoded and is stored separately from Pod definitions.

What does a liveness probe check?

It checks if a container is still running. On failure, the kubelet restarts the container to recover from unhealthy states.

Which resource is best for batch processing that completes after a queue?

Job. It runs one or more pods to completion, making it ideal for batch tasks.

What does a NodePort service provide?

It exposes the service on a static port on each cluster node, allowing external access via : .

Which command applies a configuration file declaratively?

kubectl apply. It reconciles the live state with the provided configuration file.

What is the primary purpose of an init container?

To run setup or utility tasks before the main application starts, such as waiting for dependencies or preparing data.

What is the difference between a ConfigMap and a Secret in terms of encoding?

ConfigMap stores data in plain text; Secret stores data base64-encoded. Secrets are intended for sensitive information.

How does a ReplicaSet differ from a Deployment in update behavior?

ReplicaSet does not support declarative updates; you must manually update its template. Deployment handles rolling updates and rollbacks automatically.

What happens when a readiness probe fails continuously?

The Pod is removed from the Service's endpoints until the probe passes again. It does not restart the container.

How can you use a PersistentVolumeClaim in a Pod?

Mount the claim as a volume in the Pod spec using the volumes and volumeMounts fields. The Pod then reads/writes to persistent storage.

What is the difference between kubectl apply and kubectl create?

apply is declarative and updates resources without error if they exist; create is imperative and fails if the resource already exists. apply is recommended for config management.

Active recall deck

Practice Certified Kubernetes Application Developer with real flashcards

Read the prompt, commit to an answer, then flip the card. Move through the deck at your own pace and repeat any topic that does not come back quickly.

20 free cards

Card 1 of 20

1 reviewed this session

Connect the concepts

Your Certified Kubernetes Application Developer study mind map

Open a branch to connect a topic with its practice questions and explanations. Use the map to choose your next review topic.

Certified Kubernetes Application Developer15 questions in this practice set
Understand core workload resources and their purposes.(1)
Troubleshoot applications using cluster logging.(1)
Understand networking and service exposure models.(1)
Manage application configuration using ConfigMaps.(1)
Choose the appropriate workload resource for managing application instances.(1)
Use debugging tools to diagnose application issues.(1)
Configure lifecycle probes to manage application availability.(1)
Manage compute resources for containers.(1)
Use persistent storage for stateful applications.(1)
Manage sensitive application data securely.(1)
Configure lifecycle probes to manage application health.(1)
Choose the appropriate workload resource for batch processing.(1)
More practice connections(3)
Exam-focused analysis

What this CKAD practice set measures

This is an analysis of the practice bank, not a claim about the vendor's live exam blueprint. Use it to identify the knowledge, judgment, and recall patterns exercised here, then verify your coverage against the current official exam guide.

Workload Resources and Lifecycle Management

This section focuses on the core building blocks for running containers: Pods, Deployments, ReplicaSets, Jobs, and init containers. Understanding when to use each resource is critical for application developers. Pods are the smallest unit, Deployments provide declarative updates, ReplicaSets ensure replica count, Jobs run to completion, and init containers perform setup tasks. Probes (liveness and readiness) are essential for managing container health and traffic flow.

  • Pod is the smallest deployable unit running one or more containers.
  • Deployment manages ReplicaSets and supports rolling updates and rollbacks.
  • Job is ideal for batch processes that run to completion.
  • Init containers run before main containers to prepare the environment.
  • Liveness probes restart containers; readiness probes control traffic routing.

Configuration and Storage

Managing configuration and sensitive data separately from container images is a key CKAD skill. ConfigMaps and Secrets allow you to inject environment variables, files, or command-line arguments. PersistentVolumeClaims enable pods to request persistent storage without knowing underlying storage details. The envFrom field simplifies injecting all keys from a ConfigMap or Secret into a container's environment.

  • ConfigMaps store non-sensitive configuration data; Secrets store sensitive data like passwords.
  • Use envFrom to inject all key-value pairs from a ConfigMap into a container.
  • PersistentVolumeClaims request storage resources on behalf of pods.
  • Secrets are base64-encoded and can be mounted as volumes or environment variables.

Networking and Service Exposure

Kubernetes networking enables communication between pods and external clients. Services abstract pod IPs and provide stable endpoints. ClusterIP exposes a service internally, while NodePort opens a static port on all nodes for external access. Understanding service types and when to use them is crucial for exposing applications correctly.

  • ClusterIP provides a stable internal IP for pod-to-pod communication.
  • NodePort exposes a service on a fixed port on every cluster node.
  • Services enable load balancing across pod replicas.
  • External access via NodePort uses <NodeIP>:<NodePort>.

Debugging and Resource Management

Developers must be proficient in troubleshooting and optimizing resources. kubectl logs retrieves container logs, kubectl debug creates debugging containers alongside pods. Resource requests and limits (CPU/memory) help the scheduler place pods and prevent resource starvation. kubectl apply manages resources declaratively, making it the recommended method for production configurations.

  • kubectl logs fetches logs from a container; useful for debugging.
  • kubectl debug adds a temporary container to a pod for interactive inspection.
  • Specify CPU/memory requests and limits under the resources field.
  • kubectl apply creates or updates resources declaratively from YAML/JSON files.

Study workflow

Turn one CKAD attempt into a study plan

  1. 1

    Deploy an Application Using ConfigMap

    Create a ConfigMap with key-value pairs. Then define a Pod that references the ConfigMap using envFrom. Apply the Pod YAML with kubectl apply. Verify that environment variables are injected by exec'ing into the container and running env.

  2. 2

    Expose a Pod Externally with NodePort

    Create a Deployment for your app. Create a NodePort Service targeting the deployment's selector. Check service details with kubectl get svc. Access the application using any node's IP and the assigned NodePort.

  3. 3

    Configure Readiness and Liveness Probes

    Add an HTTP readiness probe and a liveness probe to your Pod spec. Use endpoints like /healthz. Apply the Pod. Observe probe failures with kubectl describe pod. Note removal from Service endpoints on readiness failure and container restart on liveness failure.

  4. 4

    Debug a Pod with kubectl debug

    If a pod is not working, use kubectl debug mypod -it --image=busybox --copy-to=mydebugger. This creates a temporary container alongside the original pod. Use tools like curl or netstat to inspect network connectivity and filesystem.

  5. 5

    Use PersistentVolumeClaim for Storage

    Create a PersistentVolumeClaim requesting 1Gi of storage. In a Pod spec, mount the PVC at a path. The Pod will use the claim to access persistent storage. Check that data persists across pod restarts by writing a file and recreating the pod.

FAQ

Questions about this CKAD practice page

Clear boundaries on what the bank covers, how to use it, and where official vendor information still matters.

What is the difference between a ConfigMap and a Secret?+

ConfigMaps store non-confidential configuration data in plain text, while Secrets are intended for sensitive data (e.g., passwords, tokens). Secrets are base64-encoded and can be further encrypted at rest. Both can be injected as environment variables or mounted as volumes.

When should I use a Job instead of a Deployment?+

Use a Job for tasks that run to completion, like batch processing or database migrations. Deployments are for long-running services that should stay up. Jobs ensure a specified number of pods successfully terminate, making them ideal for finite workloads.

How do I choose between ClusterIP and NodePort services?+

Use ClusterIP for internal microservice communication; it is not reachable externally. Use NodePort when you need external access, such as for development or when a load balancer is not available. NodePort opens a static port on every node.

What is the purpose of a liveness probe in a CKAD exam context?+

A liveness probe checks if a container is still running. If it fails, the kubelet restarts the container. This helps recover from deadlocks or application hangs. It is separate from readiness probes, which control traffic routing.

Can I use kubectl apply on an existing resource?+

Yes, kubectl apply updates the resource declaratively. It compares the provided configuration with the live state and applies changes accordingly. This is the recommended method for managing resources in production, as it supports drift correction and works well with GitOps workflows.

Keep studying

Build the next review session

Browse another free bank or use the study strategy guide to turn your misses into spaced review.