Detail
As part of the Aerospike EKS cluster installation, POD Disruption Budget(PDB) is not part of Kubernetes Operator by default.Can we use PDB to achieve automated node rollout in our Kubernetes Operator?
Answer
Currently PDB is not tested with our Kubernetes operator and if someone wants to implement it, they should be able to do it separately and the pod should honor that using relevant labels.There can be scenarios where PDB will think that voluntary disruption can be allowed for AS pods but that disruption might result in data loss.
Also, PDB working is straight-forward but the APIs which respects PDB are limited. PDB can help with voluntary disruption but not all voluntary disruptions are constrained by Pod Disruption Budgets as mentioned in k8s documentation :
-
"kubectl drain"command uses Eviction API to drain the node and Eviction API respects PDB and hence denies request if PDB is violated. -
"kubectl delete"command directly deletes pod bypassing PDB and hence no minAvailability safe-check. User can directly delete pod or top level workload like statefulset without any restriction from PDB