Courseiva
Workloads and SchedulingeasyMultiple ChoiceObjective-mapped

CKA Workloads and Scheduling Practice Question

Which annotation is commonly used to trigger a rollout restart of a Deployment when a ConfigMap is updated?

⚠ Common exam trap

Watch out — candidates often confuse the annotation used for rollout restarts with non-existent or vendor-specific annotations, or they mistakenly think that updating a ConfigMap automatically triggers a Pod restart without any additional action.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

kubectl.kubernetes.io/restartedAt

The annotation `kubectl.kubernetes.io/restartedAt` is commonly used with `kubectl rollout restart` to trigger a rolling restart of a Deployment. When a ConfigMap is updated, Pods using it via `envFrom` or `volumes` are not automatically updated; adding or updating this annotation on the Deployment's pod template forces a new ReplicaSet to be created, picking up the latest ConfigMap data.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • configmap.kubernetes.io/update-trigger

    Why it's wrong here

    The `configmap.kubernetes.io/update-trigger` annotation is not a standard Kubernetes annotation. Kubernetes does not natively provide an annotation that automatically detects changes in a referenced ConfigMap and triggers a deployment rollout. While custom controllers or operators might implement such a mechanism, this specific annotation is not part of the core Kubernetes API or `kubectl` functionality for managing deployment restarts.

  • field.cattle.io/updateStrategy

    Why it's wrong here

    The `field.cattle.io/updateStrategy` annotation is specific to Rancher, a Kubernetes management platform, as indicated by the `cattle.io` domain prefix. It is not a standard Kubernetes annotation used for defining or triggering deployment update strategies within a vanilla Kubernetes environment. Standard Kubernetes deployments manage their update behavior through the `.spec.strategy` field, not through proprietary annotations like this.

  • kubectl.kubernetes.io/last-applied-configuration

    Why it's wrong here

    The `kubectl.kubernetes.io/last-applied-configuration` annotation is automatically added by `kubectl apply` to store the configuration that was last applied to a resource. Its primary function is to enable `kubectl diff` and subsequent `kubectl apply` commands to accurately calculate and apply changes by comparing the current live state with the stored configuration. This annotation serves for configuration management and diffing, not for directly triggering a rollout restart of a deployment.

  • kubectl.kubernetes.io/restartedAt

    Why this is correct

    The `kubectl.kubernetes.io/restartedAt` annotation is a widely adopted method to force a deployment rollout restart. When `kubectl rollout restart deployment/<name>` is executed, it patches the deployment's Pod template metadata with this annotation, setting its value to the current timestamp. This modification to the Pod template triggers a new rollout, causing all existing pods to be gracefully replaced with new ones, effectively picking up any updated ConfigMap or Secret data.

About these practice questions

Courseiva writes every CKA question from scratch — 302 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CKA practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKA exam.