Elasticsearch on Kubernetes - best practice

9/13/2019

I am going to prepare deployment configuration for Elasticsearch (elasticsearch-oss image). I found multiple non-official docs and tutorials about Elasticsearch on Kubernetes. I wonder which deployment way is the best and safest. I found 3 differend ways:

  1. Deployment using statefulset without division into master/data/client nodes. In this solution, I need to define: discovery.seed_hosts and cluster.initial_master_nodes in env config. This is further described in https://www.digitalocean.com/community/tutorials/how-to-set-up-an-elasticsearch-fluentd-and-kibana-efk-logging-stack-on-kubernetes

  2. Deployment using statefulset with division into master/data nodes (example: https://engineering.udacity.com/high-performance-elk-with-kubernetes-part-1-1d09f41a4ce2)

  3. Deployment using statefulset with division into master/data/client nodes.

In my case, I would like to have 1 master node and 2 data nodes. Which solution is best? Can you provide some good resources that describe elasticsearch deployment?

Thanks

-- michf
elasticsearch
kubernetes

2 Answers

9/13/2019

Look at ES operator from Zalando. It's pretty brilliant! https://github.com/zalando-incubator/es-operator

-- Stepan Vrany
Source: StackOverflow

9/13/2019

I would suggest to use the helm chart as your requirement is to 1 master node 2 data node.

You can edit the value.yaml file and configure the helm chart as per your need.

1 . https://github.com/elastic/helm-charts/tree/master/elasticsearch

2. https://github.com/helm/charts/tree/master/stable/elasticsearch

In helm chart also you can change the elastic search main image if you would like to change the image and make it more configurable.

-- Harsh Manvar
Source: StackOverflow