0
0
Kubernetesdevops~5 mins

Pod Disruption Budgets in Kubernetes - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a Pod Disruption Budget (PDB) in Kubernetes?
A Pod Disruption Budget is a Kubernetes resource that limits the number of pods of a service that can be voluntarily disrupted at the same time, ensuring availability during maintenance or upgrades.
Click to reveal answer
beginner
Which field in a Pod Disruption Budget specifies how many pods can be unavailable during voluntary disruptions?
The maxUnavailable field sets the maximum number or percentage of pods that can be unavailable during voluntary disruptions.
Click to reveal answer
intermediate
What is the difference between voluntary and involuntary disruptions in Kubernetes?
Voluntary disruptions are planned actions like node draining or pod eviction. Involuntary disruptions are unexpected failures like node crashes. PDBs only control voluntary disruptions.
Click to reveal answer
intermediate
How does Kubernetes behave if a Pod Disruption Budget is violated during a voluntary disruption?
Kubernetes will block the voluntary disruption if it would cause the number of available pods to fall below the PDB's allowed threshold, protecting service availability.
Click to reveal answer
beginner
Show a simple YAML snippet of a Pod Disruption Budget that allows at most 1 pod to be unavailable.
apiVersion: policy/v1 kind: PodDisruptionBudget metadata: name: example-pdb spec: maxUnavailable: 1 selector: matchLabels: app: myapp
Click to reveal answer
What does a Pod Disruption Budget control in Kubernetes?
AThe CPU usage of pods
BThe total number of pods in a cluster
CThe number of pods that can be voluntarily disrupted at once
DThe network bandwidth of pods
Which of these is NOT controlled by a Pod Disruption Budget?
AUnexpected node crashes
BNode draining disruptions
CVoluntary pod evictions
DRolling updates
In a PDB, what does setting maxUnavailable: 2 mean?
AAt most 2 pods can be unavailable during voluntary disruptions
BExactly 2 pods must be unavailable
CNo pods can be disrupted
D2 pods will be restarted automatically
If a PDB is violated, what happens when you try to drain a node?
AThe node drains immediately ignoring the PDB
BThe drain command is blocked until pods are available
CThe pods are deleted forcibly
DNothing happens, PDBs are only informational
Which selector does a Pod Disruption Budget use to identify pods it protects?
AService selector
BNode selector
CNamespace selector
DLabel selector
Explain what a Pod Disruption Budget is and why it is important in Kubernetes.
Think about how Kubernetes manages pod availability during maintenance.
You got /4 concepts.
    Describe how you would create a Pod Disruption Budget to allow only one pod to be disrupted at a time for an app labeled 'webapp'.
    Focus on the key fields in the PDB YAML.
    You got /4 concepts.