opendistro-for-elasticsearch / opendistro-build

🧰 Open Distro Build Scripts
https://opendistro.github.io/
Apache License 2.0
344 stars 175 forks source link

Add Support for Shard Allocation Awareness and Forced Allocation Awareness by Zones in OD-Build Helm #728

Open juntezhang opened 3 years ago

juntezhang commented 3 years ago

Currently, the OD-Build Helm chart does not support for Shard Allocation Awareness and Forced Allocation Awareness.

The default supported functionalities like rolling out Master and Data nodes work fine within a single zone, and configuring affinity by creating each node type on dedicated k8s nodes (VMs) also work.

Now I want to go to the next step of configuring the ES nodes into multiple zones. The way to achieve this is by adding node.attr.zone to the configuration on each ES node. The value of node.attr.zone should be the name of the zone of the k8s node where the pod is being created. Then we need to add to each master node or apply as cluster setting the cluster.routing.allocation.awareness.attributes: zone.

For Forced Awareness we need to add all values of zones in cluster.routing.allocation.awareness.force.zone.values.

Also see: https://discuss.opendistrocommunity.dev/t/adding-shard-allocation-awareness-by-zone-in-the-helm-chart/5478/3

sreekarjami commented 3 years ago

The PR : https://github.com/opendistro-for-elasticsearch/opendistro-build/pull/733 is under review.