I'm wondering about the implications of a PodDisruptionBudget when I only have one pod running. Here's my setup:
spec:
maxUnavailable: 1
selector:
matchLabels:
app.kubernetes.io/component: ui
If I try to delete this single pod, will it actually be allowed?
2 Answers
Actually, that's not correct. If you have only one pod, you won't be able to delete it safely because the PDB is set to allow a maximum of one pod to be unavailable. To go around this, you'd need to scale up your deployment to at least two replicas before you can safely delete or drain it.
Yes, you can delete the pod directly using a command like `kubectl delete pod `. However, if you try to drain the node using `kubectl drain`, it will fail because that operation requires an eviction, which the PodDisruptionBudget would prevent. So in short, direct deletion is fine, but evictions are blocked if you only have one pod.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures