WebMagicInformatica
CKAD practice questions

CKAD practice questions: Application Deployment

5 free questions on Application Deployment, 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 kustomization contains:

resources:
- deployment.yaml
namePrefix: dev-
images:
- name: nginx
  newTag: "1.27"

deployment.yaml defines a Deployment named web using nginx:1.25. What does kubectl kustomize output?

  1. A.

    A Deployment named web that uses nginx:1.27, because prefixes only apply to Services.

  2. B.

    A Deployment named dev-web that still uses nginx:1.25.

  3. C.

    An error, because images is not a valid field.

  4. D.

    A Deployment named dev-web that uses nginx:1.27.

Show answer and explanation

Answer: D

namePrefix prefixes the names of all resources (and updates references), and images transforms image names and tags.

  • Prefixes apply to every resource kind.
  • The images transformer replaces the tag.
  • images is a standard Kustomize field.
Question 2

Which command updates the container named web in deployment/web to the image nginx:1.27 and triggers a rolling update?

  1. A.

    kubectl set image deployment/web nginx:1.27

  2. B.

    kubectl set image deployment/web web=nginx:1.27

  3. C.

    kubectl update image deployment/web web=nginx:1.27

  4. D.

    kubectl rollout image deployment/web web=nginx:1.27

Show answer and explanation

Answer: B

The syntax is kubectl set image <resource> <container>=<image>.

  • The container name is required in the assignment.
  • update image and rollout image are not kubectl commands.
Question 3

kubectl rollout status deployment/web ends with error: deployment "web" exceeded its progress deadline. What does this tell you?

  1. A.

    The new ReplicaSet's Pods did not become available within progressDeadlineSeconds (default 600 s); the Deployment is not automatically rolled back, so investigate the Pods and fix or undo.

  2. B.

    The Deployment was rolled back automatically to the previous revision.

  3. C.

    The Deployment's revisionHistoryLimit was exceeded.

  4. D.

    The cluster ran out of free node ports.

Show answer and explanation

Answer: A

The progress deadline reports failure when the rollout stalls, for example due to image pull errors or failing probes. Kubernetes keeps the partial rollout until you act (kubectl describe, kubectl rollout undo).

  • No automatic rollback happens.
  • The history limit only controls stored revisions.
  • Node ports are not involved.
Question 4

Which Deployment strategy setting ensures the number of available Pods never drops below the desired replica count during a rolling update (assuming readiness probes are configured)?

  1. A.

    maxSurge: 0 with maxUnavailable: 25%

  2. B.

    revisionHistoryLimit: 0

  3. C.

    maxUnavailable: 0 together with a maxSurge of at least 1

  4. D.

    minReadySeconds: 0

Show answer and explanation

Answer: C

With maxUnavailable: 0, an old Pod is only removed once a new one is ready; this needs surge capacity (maxSurge ≥ 1 or a positive percentage).

  • maxSurge: 0 with some unavailability reduces capacity during the update.
  • History limits and minReadySeconds do not guarantee capacity.
Question 5

A kustomization uses configMapGenerator with a file app.properties. After you edit the file and run kubectl apply -k ., the Deployment's Pods are replaced automatically. Why?

  1. A.

    The kubelet watches ConfigMaps and restarts containers when they change.

  2. B.

    ConfigMaps are immutable, so Kubernetes deletes the Pods using them.

  3. C.

    The HorizontalPodAutoscaler restarts Pods on configuration changes.

  4. D.

    The generated ConfigMap name includes a hash of its content, and Kustomize updates the references; the changed name modifies the Pod template and triggers a rollout.

Show answer and explanation

Answer: D

Generated ConfigMaps get a content-hash suffix by default, so a content change means a new name and an updated reference in the Deployment, which is a template change.

  • The kubelet refreshes mounted files but does not restart containers.
  • Immutability does not delete Pods.
  • HPAs only change replica counts.

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.