Cert prep · AWS DevOps Engineer Pro (DOP-C02) · CKA · CKS

Model swap as deploy, gates and rollbacks

Practice self-check. Answers stay in this page so you can grade yourself. This is not a scored exam.

Twelve questions. Objectives: DOP-C02 task 5.3; CKA workloads and scheduling; CKA servicing and networking; CKS supply chain security. Companion lab: Hedronite modelgate (Rust), B-AI 2026-11-05.

Lab download. Starter is the tree you edit. Worked answer is a separate file; open it after the starter passes. Rust 1.85 or newer (the lesson was tested with Rust 1.98; cargo vendor was checked on Rust 1.99) and tar. One online command, cargo vendor vendor, from inside starter/ or reference/. The zip has no vendor directory, so it is not offline-ready until that command finishes. The checker then builds with cargo build --offline. DEPLOY_LOG_KEY in the checker is the demo string lab-only-key-0123456789abcdef0123456789. All lab requirements.

Q1 · DOP-C02 task 5.3, CodeDeploy alarm rollback
A team deploys an edge API to Amazon ECS with AWS CodeDeploy. The deployment group has a CloudWatch alarm attached and automatic rollback enabled for the case where an alarm threshold is met. Partway through the rollout the alarm goes to the ALARM state. What does CodeDeploy do?
Q2 · DOP-C02 task 5.3, CodePipeline failed action
A CodePipeline pipeline for the edge service stops at a failed Deploy stage. Before retrying, the team must first identify which action failed and read its logs, without changing the pipeline definition. What should they do?
Q3 · CKA workloads and scheduling, rollout undo
Deployment edge-api rolled out an image that fails in production, and its previous ReplicaSet is still retained. The team must return to the previous revision using the Deployment's own revision history, not by editing the Pod template by hand. Which command does that?
Q4 · CKA workloads and scheduling, readiness vs traffic
A model-serving container in a Pod starts successfully but begins returning wrong answers after a bad config mount. The team must stop sending Service traffic to that Pod while keeping its container running, so no kill or restart is allowed. What should they configure?
Q5 · CKA workloads and scheduling, rolling update halt
A team updates Deployment edge-api using the default RollingUpdate strategy, with maxUnavailable left at its default of 25%. The new image is broken, so the new Pods never become Ready. What does the Deployment controller do about scaling up the new ReplicaSet?
Q6 · CKA workloads and scheduling, progress deadline
Deployment edge-api exceeds its .spec.progressDeadlineSeconds and the status condition shows reason ProgressDeadlineExceeded. The team expects Kubernetes itself to roll the Deployment back to the previous revision. According to the Deployments docs, what actually happens?
Q7 · CKA servicing and networking, Service endpoints
A ClusterIP Service named edge-api selects five Pods by label. Two of the five Pods have failing readiness probes, and all five are otherwise running. What traffic behaviour should the team expect from the Service?
Q8 · CKA servicing and networking, NetworkPolicy
Namespace edge has a NetworkPolicy that selects the model-serving Pods. Ingress must be allowed only from Pods labelled role=client that run in namespaces labelled tier=frontend, and from nothing else. Which ingress.from shape does that?
Q9 · CKS supply chain security, image digest
CI scanned registry.example.com/edge/model-svc:2.1 and the build passed, but the registry owner can later push different bytes to the same tag. The Pod must run exactly the scanned content on every node, even if the tag is re-pushed. What should the Pod spec do?
Q10 · CKS supply chain security, permitted registries
Cluster policy must ensure Pods only pull images from an approved registry and that image content is validated before the Pod is admitted. The team already pins digests in Pod specs, and the control must be enforced at admission in the API server request path. Which additional control fits?
Q11 · DOP-C02 task 5.3, ECS circuit breaker rollback
An Amazon ECS service update failed. The service uses a rolling update deployment with the deployment circuit breaker enabled and its rollback option turned on. The console now shows the deployment as failed and the previous task definition is again the one running. Which documented behaviour explains this?
Q12 · CKA workloads and scheduling, self-healing primitives
The team wants a self-healing workload so that when a Pod is deleted or its node fails, a replacement Pod appears without anyone recreating it by hand. The service is long-running and must keep a fixed number of replicas. Which primitive is the documented path for this?