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:
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
Deployment using statefulset with division into master/data nodes (example: https://engineering.udacity.com/high-performance-elk-with-kubernetes-part-1-1d09f41a4ce2)
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
Look at ES operator from Zalando. It's pretty brilliant! https://github.com/zalando-incubator/es-operator
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.