<p>I am deploying the helm chart for Elastic-stack on a bare-metal k8s cluster here <a href="https://github.com/helm/charts/tree/master/stable/elastic-stack" rel="nofollow noreferrer">https://github.com/helm/charts/tree/master/stable/elastic-stack</a></p>

<p>This includes the helm chart for Elasticsearch here <a href="https://github.com/helm/charts/tree/master/stable/elasticsearch" rel="nofollow noreferrer">https://github.com/helm/charts/tree/master/stable/elasticsearch</a></p>

<p>The Elastic-stack chart calls the Elasticsearch with the default values in values.yaml, and I am not setting anything else.</p>

<p>After helm installing, I see the pods <code>elastic-stack-elasticsearch-data-0</code> and <code>elastic-stack-elasticsearch-master-0</code> are stuck in <code>Init:CrashLoopBackOff</code> (after repeating <code>Init:Error</code> for some time).</p>

<p><code>kubectl describe pod</code> shows me that the problem is with the initContainer called <code>chown</code>. The code for this container is here <a href="https://github.com/helm/charts/blob/master/stable/elasticsearch/templates/data-statefulset.yaml#L79" rel="nofollow noreferrer">https://github.com/helm/charts/blob/master/stable/elasticsearch/templates/data-statefulset.yaml#L79</a></p>

<p>The relevant output from <code>describe pod</code> is not very helpful:</p>

<pre><code>State:          Waiting
  Reason:       CrashLoopBackOff
Last State:     Terminated
  Reason:       Error
  Exit Code:    1
  Started:      Thu, 24 Jan 2019 05:35:14 +0000
  Finished:     Thu, 24 Jan 2019 05:35:14 +0000
Ready:          False
Restart Count:  1
Environment:    &lt;none&gt;
Mounts:
  /usr/share/elasticsearch/data from data (rw)
  /var/run/secrets/kubernetes.io/serviceaccount from elastic-stack-elasticsearch-data-token-kgtsm (ro)
</code></pre>

<p>I know that it is able to pull the image, since it pulled it for the previous initContainer.</p>

<p>I have a feeling it has to do with the Mounts. What exactly is <code>/usr/share/elasticsearch/data from data (rw)</code> doing? I created persistentvolumes called <code>es-data-volume</code> and <code>es-master-volume</code> and they have been claimed by <code>data-elastic-stack-elasticsearch-data-0</code> and <code>data-elastic-stack-elasticsearch-master-0</code>. Is that line looking for a volume named <code>data</code>?</p>

<p>I don't know where to look to troubleshoot this problem. What could be some possible causes of this issue? </p>

swagrov
<p>I had the same issue and this has fixed for me, I changed settings on my NFS server (sudo vim /etc/exports)</p>

<p>from:</p>

<p>/data/nfs/kubernetes          192.168.1.0/24(rw,sync,no_subtree_check)</p>

<p>to :</p>

<p>/data/nfs/kubernetes          192.168.1.0/24(rw,insecure,sync,no_subtree_check,no_root_squash)</p>

<p>from what I understood no_root_squash is the key</p>

<p>Hopefully that will solve it for you as well</p>
