[{"id":"kubernetesintermediate-001","courseId":"kubernetes-intermediate","domain":"workloads","topic":"maxSurge and maxUnavailable","prompt":"Your Deployment has 3 replicas and sets maxSurge to 25% and maxUnavailable to 25%. Each percentage must become a whole number of Pods. Which rule converts the maxSurge percentage?","hint":"Compare how this setting and maxUnavailable turn percentages into Pod counts.","explain":"Rolling update settings can be percentages of the desired Pod count, which may not divide into whole Pods. Kubernetes applies a fixed conversion rule to each setting.","source":"https://kubernetes.io/docs/concepts/workloads/controllers/deployment/","interaction":{"type":"single"},"options":[{"id":"a","text":"Rounded up","why":"The absolute number for maxSurge is calculated from the percentage by rounding up."},{"id":"b","text":"Rounded down","whyNot":"That is the rule for maxUnavailable, which rounds down. maxSurge does the opposite."},{"id":"c","text":"Rounded to the nearest whole Pod","whyNot":"Neither setting uses nearest-value rounding; each has one fixed direction."},{"id":"d","text":"Not rounded; the percentage must divide evenly","whyNot":"Percentages that don't divide evenly are still converted to whole Pods by a fixed rule."}],"answer":"a","explanation":"maxSurge percentages are converted to Pod counts by rounding up, while maxUnavailable percentages are rounded down.","concept":"maxSurge percentages are converted to Pod counts by rounding up, while maxUnavailable percentages are rounded down.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","code":"strategy:\n  type: RollingUpdate\n  rollingUpdate:\n    maxSurge: 25%\n    maxUnavailable: 25%","takeaways":["maxSurge rounds percentages up and maxUnavailable rounds them down, so the same percentage can mean different Pod counts."]},{"id":"kubernetesintermediate-002","courseId":"kubernetes-intermediate","domain":"workloads","topic":"Rolling back a Deployment","prompt":"A Deployment is at revision 3. An engineer runs kubectl scale to change it from 3 to 10 replicas, then checks kubectl rollout history. What does the history show?","hint":"Think about which kind of change counts as a new rollout.","explain":"A Deployment keeps a numbered history of its rollouts. Not every edit to the Deployment creates a new entry, so the history tracks one specific part of the spec.","source":"https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#rolling-back-a-deployment","interaction":{"type":"single"},"options":[{"id":"a","text":"Still revision 3; scaling creates no revision","why":"Scaling does not change the Pod template, so no new revision is created."},{"id":"b","text":"Revision 4; any change to the Deployment creates one","whyNot":"Only a change to the Pod template creates a revision, not every edit to the Deployment."},{"id":"c","text":"Revision 4; the replica count is stored in the revision","whyNot":"Revisions record the Pod template, and scaling does not create a revision at all."},{"id":"d","text":"Revision 3 is replaced by a revision holding 10 replicas","whyNot":"Scaling does not create a revision, so the history gets no new entry from it."}],"answer":"a","explanation":"A Deployment revision is created only when its Pod template changes; scaling, manual or automatic, does not create one.","concept":"A Deployment revision is created only when its Pod template changes; scaling, manual or automatic, does not create one.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["Scaling, manual or by an autoscaler, leaves the rollout history unchanged."]},{"id":"kubernetesintermediate-003","courseId":"kubernetes-intermediate","domain":"workloads","topic":"Init containers run before app containers","prompt":"A Pod has two init containers and two app containers. Put these steps of its startup in order.","hint":"Think about which containers must finish before others are allowed to start.","explain":"A Pod can have setup containers that run to completion before its main containers start. Each one has a clear finish point, and the main containers wait for all of them.","source":"https://kubernetes.io/docs/concepts/workloads/pods/init-containers/","interaction":{"type":"sort","items":[{"text":"The first init container runs until it completes successfully.","why":"Init containers run one at a time, and nothing else starts until this setup step finishes."},{"text":"The second init container starts after the first succeeds.","why":"Each init container must succeed before the next one can run."},{"text":"Kubelet starts the app containers once every init container has finished.","why":"App containers are initialized only after all the init containers have run to completion."},{"text":"All app containers run, and they may start in parallel.","why":"Once the init containers are done, the app containers can all start together."}]},"options":[],"answer":"o:abcd","explanation":"Init containers run one after another, each must succeed before the next starts, and app containers start only when all of them have completed.","concept":"Init containers run one after another, each must succeed before the next starts, and app containers start only when all of them have completed.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["Init containers run in sequence to completion, and app containers start only after the last one succeeds."]},{"id":"kubernetesintermediate-004","courseId":"kubernetes-intermediate","domain":"workloads","topic":"Native sidecar containers","prompt":"A native sidecar container must finish and exit before the Pod's main application container starts, just as a regular init container does.","hint":"Consider whether this helper is meant to finish before the app, or keep running alongside it.","explain":"A Pod can run helper containers in two ways: some run to completion before the app, and others keep running for the Pod's lifetime. The helper's lifecycle decides how it interacts with the app containers.","source":"https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/","interaction":{"type":"true-false"},"options":[{"id":"a","text":"True","whyNot":"Init containers must finish first, but a sidecar starts before the app and keeps running alongside it."},{"id":"b","text":"False","why":"A sidecar starts before the main container and continues to run, so it does not have to exit first."}],"answer":"b","explanation":"Native sidecar containers start before the main container and keep running for the Pod's lifetime; regular init containers run to completion first.","concept":"Native sidecar containers start before the main container and keep running for the Pod's lifetime; regular init containers run to completion first.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["Init containers must exit before the app starts; native sidecars keep running alongside it."]},{"id":"kubernetesintermediate-005","courseId":"kubernetes-intermediate","domain":"workloads","topic":"PodDisruptionBudget limits voluntary disruption","prompt":"A Deployment with 5 replicas has a PodDisruptionBudget. An admin runs kubectl drain on a node that holds two of its Pods. Which TWO statements about the PDB are true?","hint":"Think about which actions go through the Eviction API and which bypass it.","explain":"A PodDisruptionBudget caps how many Pods of an app can be down at the same time from voluntary actions. Some actions skip it, and involuntary failures can't be blocked by it.","source":"https://kubernetes.io/docs/concepts/workloads/pods/disruptions/","interaction":{"type":"multiple","tellCount":true},"options":[{"id":"a","text":"The drain's evictions go through the Eviction API, which the PDB can delay.","why":"kubectl drain uses the Eviction API, which respects PDBs and may temporarily reject an eviction."},{"id":"b","text":"A Pod lost in a node crash still counts against the budget, though the PDB cannot prevent the crash.","why":"Involuntary disruptions cannot be prevented by PDBs, but they still count against the budget."},{"id":"c","text":"The PDB stops the Deployment's rolling update from replacing Pods.","whyNot":"Rolling upgrades of Deployments are not limited by PDBs; the Deployment's own update settings control them."},{"id":"d","text":"kubectl delete pod is blocked whenever a PDB exists.","whyNot":"Deleting pods directly bypasses PodDisruptionBudgets, so the budget does not stop it."},{"id":"e","text":"The PDB sets how many replicas the Deployment should run.","whyNot":"The intended count comes from the workload's .spec.replicas; the PDB only limits disruption."},{"id":"f","text":"Evicted Pods skip graceful shutdown when a PDB is present.","whyNot":"Evicted Pods are gracefully terminated, honoring terminationGracePeriodSeconds, and a PDB does not change that."}],"answer":"ab","explanation":"A PDB limits simultaneous voluntary disruptions that go through the Eviction API; involuntary disruptions cannot be prevented but still count against the budget.","concept":"A PDB limits simultaneous voluntary disruptions that go through the Eviction API; involuntary disruptions cannot be prevented but still count against the budget.","rev":1,"updatedAt":"2026-10-23","kind":"scenario","takeaways":["PDBs guard Eviction API calls, not direct deletes or Deployment rolling upgrades."]}]