<p>I've been trying to get Elasticsearch running on K8s using the <a href="https://github.com/helm/charts/tree/master/stable/elasticsearch" rel="nofollow noreferrer">newly-promoted-to-stable helm chart</a>, which works fine, BTW, for elasticsearch v 6.4.2.  However, we're tied to a grails app that requires elasticsearch v 5.5.3, for which we don't have the ability to upgrade.  I've downgraded the elasticsearch image version in the chart to 5.5.3 (and also tried v 5.6.12) but it fails to start.</p>

<p>I looked into the <a href="https://github.com/upmc-enterprises/elasticsearch-operator" rel="nofollow noreferrer">elasticsearch operator</a>, but it's currently set up to work with AWS S3 storage types, out of the box, and GCP with a little work (although no snapshot ability).  Before I dive into this, I'd like to know if it will work with 5.5.3, to begin with.</p>

<p>Does anyone know if I can get elasticsearch v 5.5.3 running in a k8s cluster?  I would say using a k8s StatefulSet at a minimum.</p>

<p>Thanks!</p>

<p><strong>Update</strong></p>

<p>I suppose I should have given the errors that the existing helm chart is having when downgrading elasticsearch image to 5.5.3.</p>

<p>master-0 pod fails to start with:</p>

<p><code>Error injecting constructor, ElasticsearchException[java.io.IOException: failed to read [id:15, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/global-15.st]]; nested: IOException[failed to read [id:15, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/global-15.st]]; nested: ElasticsearchException[Unknown license version found, please upgrade all nodes to the latest elasticsearch-license plugin];
  at org.elasticsearch.gateway.GatewayMetaState.&lt;init&gt;(Unknown Source)
  while locating org.elasticsearch.gateway.GatewayMetaState
    for parameter 4 at org.elasticsearch.gateway.GatewayService.&lt;init&gt;(Unknown Source)
  while locating org.elasticsearch.gateway.GatewayService
Caused by: ElasticsearchException[java.io.IOException: failed to read [id:15, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/global-15.st]]; nested: IOException[failed to read [id:15, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/global-15.st]]; nested: ElasticsearchException[Unknown license version found, please upgrade all nodes to the latest elasticsearch-license plugin];
</code></p>

<p>The client pods fail with:</p>

<p><code>[2018-10-22T17:52:51,835][WARN ][o.e.d.z.UnicastZenPing   ] [elasticsearch-client-6bf954c595-7zlpc] failed to resolve host [elasticsearch-discovery]
java.net.UnknownHostException: elasticsearch-discovery
</code></p>

<p>Clearly, it's expecting a later elasticsearch version.</p>

<p>The short answer here is that ElasticSearch 5.5.3 should work with Kubernetes. Note the configs for 5.5.3 are slightly different, I believe they changed after 5.6 where for example the made <a href="https://www.elastic.co/guide/en/x-pack/current/xpack-introduction.html" rel="nofollow noreferrer">x-pack</a> enabled by default, and yes use a <a href="https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/" rel="nofollow noreferrer">StatefulSet</a> or start from the existing stable Helm chart.</p>
