Skip to content

KCNA · Domain 3: Cloud Native Application Delivery · 16% of the exam

Task 3.1: Application Delivery

Rolling updates and rollbacks, blue-green and canary releases, configuration with ConfigMaps and Secrets, packaging with Helm and Kustomize, CI/CD pipelines, and GitOps with Argo CD and Flux.

Study it

Sample questions

Try each one before opening the answer. Every option is explained, with the CNCF documentation page that proves it.

Question 1 · choose 1

A Deployment runs 4 replicas behind a Service. During every image update the team must never have fewer than 4 Pods available, and a brief extra Pod during the rollout is acceptable. How should the rolling update be configured?

  1. AmaxUnavailable set to 1 and maxSurge set to 0
  2. BmaxUnavailable set to 0 and maxSurge set to 1
  3. CThe Recreate strategy instead of RollingUpdate
  4. DrevisionHistoryLimit set to 0
Show the answer and why
  • AmaxUnavailable set to 1 and maxSurge set to 0

    Incorrect

    This removes an old Pod before a new one exists, so availability drops to 3 during the rollout.

  • BmaxUnavailable set to 0 and maxSurge set to 1

    Correct

    With no Pods allowed to be unavailable and one extra allowed, the controller starts a new Pod, waits for it to be ready, and only then removes an old one.

  • CThe Recreate strategy instead of RollingUpdate

    Incorrect

    Recreate stops every old Pod before creating new ones, which causes downtime.

  • DrevisionHistoryLimit set to 0

    Incorrect

    That only controls how many old ReplicaSets are kept for rollback; it has no effect on availability during a rollout.

maxUnavailable caps how many Pods may be missing and maxSurge how many may be added during a rolling update; 0 and 1 keep full capacity at the cost of one extra Pod.

Question 2 · choose 1

Minutes after a new image is rolled out, a Deployment's error rate jumps. The previous version was healthy, and the team wants it back as fast as possible without editing any manifest. Which command does that?

  1. Akubectl rollout restart deployment/web
  2. Bkubectl scale deployment/web --replicas=0
  3. Ckubectl delete deployment web and re-apply the old manifest
  4. Dkubectl rollout undo deployment/web
Show the answer and why
  • Akubectl rollout restart deployment/web

    Incorrect

    restart replaces the Pods but keeps the current, faulty version.

  • Bkubectl scale deployment/web --replicas=0

    Incorrect

    Scaling to zero stops the errors by stopping the service entirely.

  • Ckubectl delete deployment web and re-apply the old manifest

    Incorrect

    That causes downtime and needs the old manifest at hand, while a built-in rollback exists.

  • Dkubectl rollout undo deployment/web

    Correct

    rollout undo rolls the Deployment back to its previous revision, reusing the old ReplicaSet.

Deployments keep their rollout history as old ReplicaSets, so a rollback to the last good revision is a single command.

Question 3 · choose 1

A new release of a web app cannot run next to the old one because of an incompatible session format. The team wants the new version fully running and tested first, then all traffic switched at once, with a quick way back. Which approach fits?

  1. ABlue-green, bringing up the new Deployment and then switching the Service selector
  2. BA canary release that sends 5% of the traffic to the new version, then more
  3. CA rolling update with maxSurge at 25% so new Pods start before old ones stop
  4. DThe Recreate strategy, which stops the old Pods before starting the new ones
Show the answer and why
  • ABlue-green, bringing up the new Deployment and then switching the Service selector

    Correct

    Blue-green keeps two complete environments and switches traffic in one step; switching back is the same change in reverse.

  • BA canary release that sends 5% of the traffic to the new version, then more

    Incorrect

    A canary runs both versions side by side and shifts traffic gradually, which the incompatible versions cannot tolerate.

  • CA rolling update with maxSurge at 25% so new Pods start before old ones stop

    Incorrect

    A rolling update also mixes old and new Pods behind the Service while it progresses.

  • DThe Recreate strategy, which stops the old Pods before starting the new ones

    Incorrect

    Recreate avoids mixing versions, but it removes the old Pods before the new ones are up and tested, so there is downtime and no ready fallback.

When versions cannot coexist and downtime is unacceptable, blue-green lets the new environment be prepared in full and receive the traffic all at once.

Question 4 · choose 1

A team wants the desired state of its clusters kept in Git, with an agent inside each cluster that continuously compares the cluster with the repository and reverts manual changes. Which practice is this?

  1. AA CI pipeline that runs kubectl apply after each merge
  2. BPackaging the manifests as a Helm chart in a chart repository
  3. CGitOps, using a tool such as Argo CD or Flux
  4. DRecording every kubectl edit in a change ticket
Show the answer and why
  • AA CI pipeline that runs kubectl apply after each merge

    Incorrect

    A pipeline pushes changes when it runs; between runs nothing notices or reverts a manual change.

  • BPackaging the manifests as a Helm chart in a chart repository

    Incorrect

    Packaging makes resources reusable and installable; it does not keep watching the cluster.

  • CGitOps, using a tool such as Argo CD or Flux

    Correct

    GitOps continuously evaluates and reconciles the live state against the state defined in version control, which also undoes drift.

  • DRecording every kubectl edit in a change ticket

    Incorrect

    Tickets document changes after the fact; they neither make Git the source of truth nor reconcile anything.

GitOps treats version control as the source of truth and uses automated reconciliation, typically by an in-cluster agent, to keep the live system in line with it.

Question 5 · choose 2

A team ships the same application to dev and production. Production needs more replicas, a different image tag and extra labels, and the team wants one shared base of manifests rather than two hand-edited copies. Which two tools are built for this? (Choose TWO.)

  1. AHelm, with one chart and a different values file per environment
  2. BA ConfigMap per environment that holds the replica count
  3. CRunning kubectl scale by hand after each production deployment
  4. DKustomize, with a shared base and an overlay per environment
  5. EA HorizontalPodAutoscaler with a different minReplicas per environment
Show the answer and why
  • AHelm, with one chart and a different values file per environment

    Correct

    Helm manages packages of pre-configured resources called charts, and values let one chart render differently per environment.

  • BA ConfigMap per environment that holds the replica count

    Incorrect

    A ConfigMap feeds configuration to containers; the Deployment's replica field does not read from it.

  • CRunning kubectl scale by hand after each production deployment

    Incorrect

    Manual commands drift from the files and still leave the tag and labels unchanged.

  • DKustomize, with a shared base and an overlay per environment

    Correct

    Kustomize adds, removes or updates configuration in manifests without templates, and kubectl applies it with -k.

  • EA HorizontalPodAutoscaler with a different minReplicas per environment

    Incorrect

    An autoscaler adjusts replicas from metrics, but it cannot change the image tag or labels.

Helm and Kustomize both produce environment-specific manifests from one shared definition: Helm through templated charts and values, Kustomize through bases and overlays.

Question 6 · choose 1

An application reads its LOG_LEVEL from an environment variable populated from a ConfigMap. The team changed the value in the ConfigMap an hour ago, but the running Pods still log at the old level. What has to happen?

  1. ANothing; the kubelet pushes the new value into the running containers at its next sync
  2. BRestart the Pods, for example with kubectl rollout restart, to load the new value
  3. CMark the ConfigMap immutable so that its new value is enforced
  4. DDelete the ConfigMap and create it again under the same name
Show the answer and why
  • ANothing; the kubelet pushes the new value into the running containers at its next sync

    Incorrect

    Periodic syncs refresh ConfigMaps mounted as volumes, not values already injected as environment variables.

  • BRestart the Pods, for example with kubectl rollout restart, to load the new value

    Correct

    Environment variables are set when a container starts; ConfigMaps consumed as environment variables are not updated in running Pods.

  • CMark the ConfigMap immutable so that its new value is enforced

    Incorrect

    Immutability blocks later changes to the ConfigMap; it does not deliver the new value.

  • DDelete the ConfigMap and create it again under the same name

    Incorrect

    Recreating it does not touch the environment of containers that are already running.

Environment values are fixed for the life of a container, so a change reaches the application only through new Pods.

Question 7 · choose 1

A ConfigMap holds twelve settings, and the application expects each one as an environment variable of the same name. How can the Pod spec load all of them without listing each key?

  1. AenvFrom with a configMapRef to the ConfigMap
  2. Benv with one valueFrom entry per key
  3. CA volume mount of the ConfigMap at /etc/env
  4. DThe downward API with fieldPath set to the ConfigMap
Show the answer and why
  • AenvFrom with a configMapRef to the ConfigMap

    Correct

    envFrom defines all of a ConfigMap's data as container environment variables.

  • Benv with one valueFrom entry per key

    Incorrect

    That works but lists every key by hand, which the team wants to avoid.

  • CA volume mount of the ConfigMap at /etc/env

    Incorrect

    A volume mount gives files, not environment variables.

  • DThe downward API with fieldPath set to the ConfigMap

    Incorrect

    The downward API exposes Pod fields, not ConfigMap data.

envFrom imports a whole ConfigMap as environment variables; env with valueFrom picks single keys.

Question 8 · choose 1

An application's configuration includes a log level, a feature flag and a database password. Where should the password go?

  1. AInto the same ConfigMap as the other settings
  2. BInto the container image at build time
  3. CInto a Secret, the rest into a ConfigMap
  4. DInto an annotation on the Deployment object
Show the answer and why
  • AInto the same ConfigMap as the other settings

    Incorrect

    A ConfigMap does not provide secrecy or encryption.

  • BInto the container image at build time

    Incorrect

    Baking credentials into images exposes them to anyone who can pull the image.

  • CInto a Secret, the rest into a ConfigMap

    Correct

    ConfigMaps hold non-confidential data and provide no secrecy; confidential values belong in Secrets.

  • DInto an annotation on the Deployment object

    Incorrect

    Annotations are readable metadata, not a place for credentials.

Split configuration by sensitivity: ConfigMaps for ordinary settings, Secrets for credentials.

Question 9 · choose 1

A data team wants to define multi-step pipelines in which each step runs in its own container on Kubernetes, with dependencies between steps. What should the team use?

  1. AA CronJob for each step, timed so they do not overlap
  2. BOne Job whose script runs each step in turn
  3. CArgo, with its Kubernetes-native workflow engine
  4. DA Deployment with one init container per step
Show the answer and why
  • AA CronJob for each step, timed so they do not overlap

    Incorrect

    Timed jobs do not express dependencies between steps.

  • BOne Job whose script runs each step in turn

    Incorrect

    One script hides the steps from Kubernetes and loses per-step containers.

  • CArgo, with its Kubernetes-native workflow engine

    Correct

    Argo provides Kubernetes-native tools to run workflows, among other things.

  • DA Deployment with one init container per step

    Incorrect

    Init containers prepare a Pod; they do not form a pipeline with dependencies of its own.

Workflow engines such as Argo Workflows model steps and dependencies as containers on the cluster.

Question 10 · choose 1

A pipeline must check that manifests would be accepted by the cluster, including its admission policies, without creating or changing anything. Which command does that?

  1. Akubectl apply --dry-run=client -f manifests/
  2. Bkubectl create --save-config -f manifests/
  3. Ckubectl explain on each kind in the manifests
  4. Dkubectl apply --dry-run=server -f manifests/
Show the answer and why
  • Akubectl apply --dry-run=client -f manifests/

    Incorrect

    A client dry run only prints the objects locally; the cluster's admission never sees them.

  • Bkubectl create --save-config -f manifests/

    Incorrect

    That creates the objects for real.

  • Ckubectl explain on each kind in the manifests

    Incorrect

    explain documents fields; it validates nothing.

  • Dkubectl apply --dry-run=server -f manifests/

    Correct

    A server dry run submits the request to the API server, including admission, without persisting the objects.

Server-side dry runs go through validation and admission, so they catch what the cluster would reject.

Practise domain 3 →Practise all domains →