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?
your secret name should be like : {clusterName}-es-elastic-user
kubectl create secret generic my-cluster-es-elastic-user --from-literal=elastic=foobar
secret/my-cluster-es-elastic-user created
$ cat <<'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
elasticsearch.elasticsearch.k8s.elastic.co/my-cluster configured
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"
}
For more info, you can visit official repo: https://github.com/elastic/cloud-on-k8s/issues/967#issuecomment-497636249