Hello Tanul,
Thanks for your question.
Your deployment is maxUnavailable: 25% and PodDisruptionBudget is maxUnavailable: 50 percent (which means that at most 50% of the pods can be unavailable at any given time). With 20 replicas, 50% maxUnavailable means 10 pods can be unavailable.
Try this:
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: pdb-nginx2
spec:
maxUnavailable: 75%
selector:
matchLabels:
app: nginx2
You can mark it 'Accept Answer' and 'Upvote' if this helped you
Regards,
Abiola