diff --git a/README.md b/README.md index 3b4fac2..e0399c2 100644 --- a/README.md +++ b/README.md @@ -222,6 +222,16 @@ spec: +## PodDisruptionBudget + +If you want to ensure that more than 1 node won't be unavailable at a time, you can add PodDisruptionBudget manifests: +``` +kubectl create -f es-master-pdb.yaml +kubectl create -f es-data-pdb.yaml +``` + +Note: It's not recommended to grow this number because 1 node could be in maintenance, another fall down and you can't lose another node if the number of replicas is equal to two. + ## Deploying with Helm [Helm](https://github.com/kubernetes/helm) charts for a basic (non-stateful) ElasticSearch deployment are maintained at https://github.com/clockworksoul/helm-elasticsearch. With Helm properly installed and configured, standing up a complete cluster is almost trivial: diff --git a/es-data-pdb.yaml b/es-data-pdb.yaml new file mode 100644 index 0000000..2ac8240 --- /dev/null +++ b/es-data-pdb.yaml @@ -0,0 +1,10 @@ +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: elasticsearch-data +spec: + maxUnavailable: 1 + selector: + matchLabels: + component: elasticsearch + role: data diff --git a/es-master-pdb.yaml b/es-master-pdb.yaml new file mode 100644 index 0000000..eff3d2a --- /dev/null +++ b/es-master-pdb.yaml @@ -0,0 +1,10 @@ +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: elasticsearch-master +spec: + maxUnavailable: 1 + selector: + matchLabels: + component: elasticsearch + role: master