0
0
Kubernetesdevops~20 mins

Rolling update strategy in Kubernetes - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Rolling Update Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Rolling Update Basics

What is the main advantage of using a rolling update strategy in Kubernetes deployments?

AIt updates pods one at a time, ensuring service availability during updates.
BIt pauses the deployment until manual approval is given for each pod.
CIt updates all pods simultaneously, minimizing downtime.
DIt deletes all old pods before creating new ones to save resources.
Attempts:
2 left
💡 Hint

Think about how service availability is maintained during updates.

💻 Command Output
intermediate
2:00remaining
Interpreting Rolling Update Status

What is the output of the following command if a rolling update is in progress and 2 out of 5 pods have been updated?

Kubernetes
kubectl rollout status deployment/myapp
AWaiting for rollout to finish: 3 old replicas are pending termination...
BWaiting for rollout to finish: 2 out of 5 new replicas are available...
CError from server (NotFound): deployments.apps "myapp" not found
Ddeployment "myapp" successfully rolled out
Attempts:
2 left
💡 Hint

Look for messages indicating partial progress in rollout.

Configuration
advanced
2:00remaining
Configuring Max Surge and Max Unavailable

Given this deployment snippet, what is the maximum number of pods that can be unavailable during the rolling update?

strategy:
  type: RollingUpdate
  rollingUpdate:
    maxSurge: 2
    maxUnavailable: 1
A1 pod can be unavailable at once
B2 pods can be unavailable at once
CNo pods can be unavailable during update
D3 pods can be unavailable at once
Attempts:
2 left
💡 Hint

Check the value of maxUnavailable in the configuration.

Troubleshoot
advanced
2:00remaining
Troubleshooting a Stuck Rolling Update

You started a rolling update but it is stuck and not progressing. Which of the following is the most likely cause?

AThe old pods are terminating too quickly, causing downtime.
BThe deployment has <code>maxSurge</code> set to 0, allowing no extra pods.
CThe new pods are failing readiness probes, so they are not marked ready.
DThe deployment strategy is set to Recreate instead of RollingUpdate.
Attempts:
2 left
💡 Hint

Consider what prevents new pods from becoming available during update.

🔀 Workflow
expert
3:00remaining
Rolling Update Workflow Steps

Arrange the steps of a Kubernetes rolling update in the correct order.

A1,3,2,4
B3,1,2,4
C2,1,3,4
D1,2,3,4
Attempts:
2 left
💡 Hint

Think about how new pods are created and verified before old pods are removed.