WebMagicInformatica
CKAD practice questions

CKAD practice questions: Application Design and Build

5 free questions on Application Design and Build, 20% of the Kubernetes: CKAD exam. Try each one, then open the answer and explanation. None of them are in the free readiness check, so you can still take it fresh.

Question 1

A batch workload needs 5 successful completions, running 2 Pods at a time. Which Job spec fields do this?

  1. A.

    replicas: 5 and maxSurge: 2

  2. B.

    completions: 5 and parallelism: 2

  3. C.

    backoffLimit: 5 and activeDeadlineSeconds: 2

  4. D.

    completions: 2 and parallelism: 5

Show answer and explanation

Answer: B

completions is the number of successful Pods required; parallelism is how many may run at once.

  • Jobs have no replicas or maxSurge.
  • backoffLimit limits retries and activeDeadlineSeconds limits runtime.
  • The last option swaps the values.
Question 2Choose 2

Which TWO statements about regular init containers (those without a container-level restartPolicy) are correct? (Choose two.)

  1. A.

    If an init container fails, the kubelet retries it according to the Pod's restartPolicy, and the app containers do not start.

  2. B.

    Each init container must use the same image as the app containers.

  3. C.

    They share no volumes with the app containers.

  4. D.

    They run in parallel with the app containers.

  5. E.

    They run to completion one after another, in order, before the app containers start.

Show answer and explanation

Answer: A and E

Regular init containers prepare the Pod (wait for a dependency, fetch config) and must each succeed, in order, before the main containers start. (An init container with restartPolicy: Always is a native sidecar instead: it keeps running and does not block on completion.)

  • They are sequential, not parallel with the app containers.
  • Any image can be used; a common pattern is a small tool image such as busybox.
  • They can mount the same volumes as the other containers, which is how they hand data over.
Question 3

Finished Jobs should be deleted automatically 100 seconds after they complete. Which Job field does this?

  1. A.

    ttlSecondsAfterFinished: 100

  2. B.

    activeDeadlineSeconds: 100

  3. C.

    backoffLimit: 100

  4. D.

    suspend: true

Show answer and explanation

Answer: A

ttlSecondsAfterFinished lets the TTL controller delete a Job (and its Pods) after it completes or fails.

  • activeDeadlineSeconds limits how long the Job may run.
  • backoffLimit limits retries.
  • suspend pauses a Job.
Question 4

The main container talks to localhost:6379. A second container in the same Pod receives that traffic and forwards it to a sharded Redis cluster, so the application does not need to know the cluster layout. Which multi-container pattern is this?

  1. A.

    The adapter pattern

  2. B.

    An init container

  3. C.

    The ambassador pattern

  4. D.

    The leader election pattern

Show answer and explanation

Answer: C

An ambassador container proxies the application's connections to the outside world. An adapter transforms the output of the main container (for example logs or metrics) into a standard format, and init containers run before the app.

  • Leader election is a coordination pattern, not a proxy.
Question 5Choose 2

Which TWO statements about volumes are correct? (Choose two.)

  1. A.

    Data in an emptyDir survives deletion of the Pod.

  2. B.

    Data in an emptyDir survives container restarts but is deleted when the Pod is removed from the node.

  3. C.

    A hostPath volume gives the Pod the same files on whichever node it is scheduled.

  4. D.

    A configMap volume is writable by the application and updates the ConfigMap.

  5. E.

    Data in a PersistentVolume claimed through a PVC can outlive the Pod that used it.

Show answer and explanation

Answer: B and E

emptyDir lives as long as the Pod; PVs have a lifecycle independent of Pods.

  • emptyDir is deleted with the Pod.
  • hostPath shows the files of the particular node, which differ between nodes.
  • ConfigMap volumes are read-only.

How ready are you for CKAD?

Take the free readiness check: 15 questions from every exam domain in 20 minutes, with your score per domain.

  • 20 minutes
  • 15 questions
  • Free with an account

More CKAD practice by topic

Back to the CKAD practice test →

Independent practice material written from the official exam guide. Not affiliated with or endorsed by the exam provider.