Pod disruption budget
editPod disruption budget
editA Pod Disruption Budget (PDB) allows you to limit the disruption to your application when its pods need to be rescheduled for some reason such as upgrades or routine maintenance work on the Kubernetes nodes.
ECK manages a default PDB per Elasticsearch resource. It allows one Elasticsearch Pod to be taken down, as long as the cluster has a green
health. Single-node clusters are not considered highly available and can always be disrupted.
In the Elasticsearch specification, you can change the default behaviour as follows:
apiVersion: elasticsearch.k8s.elastic.co/v1 kind: Elasticsearch metadata: name: quickstart spec: version: 8.16.0 nodeSets: - name: default count: 3 podDisruptionBudget: spec: minAvailable: 2 selector: matchLabels: elasticsearch.k8s.elastic.co/cluster-name: quickstart
maxUnavailable
cannot be used with an arbitrary label selector, therefore minAvailable
is used in this example.
You can also explicitly disable the default PDB:
apiVersion: elasticsearch.k8s.elastic.co/v1 kind: Elasticsearch metadata: name: quickstart spec: version: 8.16.0 nodeSets: - name: default count: 3 podDisruptionBudget: {}