In the documentation here it is stated that deleting a pod is a voluntary disruption that PodDisruptionBudget should protect against.
I have created a simple test:
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: test
spec:
minAvailable: 1
selector:
matchLabels:
app: test
---
apiVersion: v1
kind: Pod
metadata:
name: test
labels:
app: test
spec:
containers:
- name: test
image: myimage
Now if I run apply and then delete pod test, there is no trouble deleting this pod.
If I now run cordon node, then it is stuck as it cannot evict the last pod (which is correct). But the same behavior seems to not be true for deleting the pod.
The same goes if I create a deployment with minimum 2 replicas and just delete both at the same time - they are deleted as well (not one by one).
Do I misunderstand something here?