Set custom password on Elasticsearch resource

When spinning up a new Elasticsearch resource, a new password is created than can be retrieved as follows:

PASSWORD=$(k get secret clusterName-es-elastic-user -o json | jq -r .data.elastic | base64 -D

Is there a way to pre/define hard-code the password so:

a) it does not change upon cluster destruction / recreation

b) it can be rotated on demand?

Found out the relevant documentation.

My question is whether usage of stringData in the k8s secret is mandatory.

stringData is a K8S trick to avoid base64 encoding when creating a Secret:

If the conversion to base64 string is not desirable, you can choose to specify the stringData field instead, which accepts arbitrary strings as values.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.