<p>I am using eck, and on every installation, the eck operator set a new password. Possible to fix the password to a constant value? anyone tried this?</p>

<p>your secret name should be like : {clusterName}-es-elastic-user</p>

<pre><code>kubectl create secret generic my-cluster-es-elastic-user --from-literal=elastic=foobar
</code></pre>

<blockquote>
  <p>secret/my-cluster-es-elastic-user created</p>
</blockquote>

<pre><code>$ cat &lt;&lt;'EOFTEST' | kubectl apply -f -
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: my-cluster
spec:
  version: 7.1.0
  nodes:
  - nodeCount: 1
EOFTEST
</code></pre>

<p>elasticsearch.elasticsearch.k8s.elastic.co/my-cluster configured</p>

<pre><code>another terminal:
$ kubectl port-forward service/my-cluster-es 9200:9200
$ curl -k -u elastic:foobar https://localhost:9200
{
  "name" : "testing-es-5ps8sl8sfn",
  "cluster_name" : "my-cluster",
  ...
  "tagline" : "You Know, for Search"
}
</code></pre>

<p>For more info, you can visit official repo: <a href="https://github.com/elastic/cloud-on-k8s/issues/967#issuecomment-497636249" rel="nofollow noreferrer">https://github.com/elastic/cloud-on-k8s/issues/967#issuecomment-497636249</a></p>
