# Check elasticsearch cluster health without authentication when security feature is enable

**URL:** <https://discuss.elastic.co/t/check-elasticsearch-cluster-health-without-authentication-when-security-feature-is-enable/199903>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [September 18, 2019, 3:07am UTC](https://discuss.elastic.co/t/check-elasticsearch-cluster-health-without-authentication-when-security-feature-is-enable/199903 "2019-09-18T03:07:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lex\_Xiao](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lex_xiao/32/47953_2.png) [@Lex\_Xiao](https://discuss.elastic.co/u/Lex_Xiao)\
**Post date:** [September 18, 2019, 3:07am UTC](https://discuss.elastic.co/t/check-elasticsearch-cluster-health-without-authentication-when-security-feature-is-enable/199903/1 "2019-09-18T03:07:24Z")

</div>

I want to set up elasticsearch cluster automatically with ansible. Reset built-in users password with elasticsearch-setup-password after cluster is up. There is a readiness probe to check if cluster is up and ready. But I could not check cluster status before reset password for built-in user according to api authentication. Tried to pass ELASTIC\_PASSWORD environment, but it didn't work. I use kubernetes to deploy elasticsearch. So how to achieve this?

elasticsearch version: 7.2

---

<div class="post-metadata">

**Author:** ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)\
**Post date:** [September 18, 2019, 10:05am UTC](https://discuss.elastic.co/t/check-elasticsearch-cluster-health-without-authentication-when-security-feature-is-enable/199903/2 "2019-09-18T10:05:09Z")

</div>

`elasticsearch-setup-passwords` is not really meant to be used in scripting or from a configuration management system. In your case I would suggest that

> [@Lex\_Xiao](#):
>
> Tried to pass ELASTIC\_PASSWORD environment, but it didn't work.

How did you try it and how didn't it work ? 🙂

See our docs on how to pass `ELASTIC_PASSWORD` correctly: [Encrypting communications in an Elasticsearch Docker Container | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/configuring-tls-docker.html) . Once this is configured, you can set the passwords for all the built in users using the [change passwords API](https://www.elastic.co/guide/en/elasticsearch/reference/7.3/security-api-change-password.html)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 16, 2019, 10:05am UTC](https://discuss.elastic.co/t/check-elasticsearch-cluster-health-without-authentication-when-security-feature-is-enable/199903/3 "2019-10-16T10:05:09Z")

</div>

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