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?
✗ Incorrect
A Pod Disruption Budget limits voluntary disruptions to maintain availability.
Which of these is NOT controlled by a Pod Disruption Budget?
✗ Incorrect
PDBs do not control involuntary disruptions like node crashes.
In a PDB, what does setting
maxUnavailable: 2 mean?✗ Incorrect
maxUnavailable sets the maximum number of pods allowed to be down during voluntary disruptions.
If a PDB is violated, what happens when you try to drain a node?
✗ Incorrect
Kubernetes blocks voluntary disruptions that violate the PDB to protect availability.
Which selector does a Pod Disruption Budget use to identify pods it protects?
✗ Incorrect
PDBs use label selectors to match the pods they protect.
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.