How does one set passwords in a pod with x-pack true

All the examples are related to running
bin/elasticsearch-setup-passwords interactive or auto however once elastic pod is started there is no way to shutdown to run these commands. Is there an env variable that can be passed?

I'm not sure exactly what you refer to with elastic pod but Elasticsearch should be running for you to run elasticsearch-setup-passwords , so there is no need to shut it down.

In any way , you can pass the password for the elastic user with the ELASTIC_PASSWORD env variable if you wish and then use the Change Passwords API to set the password for the rest of the users. See our docs

Hi @Soumitra_Ghosh,

As I was thankfully made aware by @joshbressers, you're probably talking about k8s. In that case, and assuming you are using our orchestrator, please take a look at our relevant documentation, more specifically step 2 under this section

Hi thank you. Yes correct its on k8s it is on a cluster I built. This example is for a single node. Will this not work for a multi node elasticsearch cluster on k8s?

I don't see why it won't

Hi so you had originally said we could pass this through the env variable would that not work? I tried to seed it through yaml file but it does not take that value.
- name: elasticsearch.user
value: "elastic"
- name: elasticsearch.password
value: "changeme"

My assumption for suggesting that previously, was that you use our docker image so I just mentioned what our docs say.

Since you are on k8s, please follow the relevant docs and the suggestions in there.

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