# Removing elastic-user Secret from K8s Secrets

**URL:** <https://discuss.elastic.co/t/removing-elastic-user-secret-from-k8s-secrets/287544>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [October 25, 2021, 7:12am UTC](https://discuss.elastic.co/t/removing-elastic-user-secret-from-k8s-secrets/287544 "2021-10-25T07:12:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![x00m](https://avatars.discourse-cdn.com/v4/letter/x/90db22/32.png) [@x00m](https://discuss.elastic.co/u/x00m)\
**Post date:** [October 25, 2021, 7:12am UTC](https://discuss.elastic.co/t/removing-elastic-user-secret-from-k8s-secrets/287544/1 "2021-10-25T07:12:14Z")

</div>

When we create an Elasticsearch resource, the credentials for the "elastic" user are created and stored in the kubernetes secrets, with the name "-es-elastic-user"

Is it safe to delete this k8s secret? Does the system have any dependency on this secret?  
What about the other secrets like ca-certs, internal-users, etc?

My goal is to use a different secret store (Azure Keyvault) to store the secrets. The Azure keyvault csi driver can be used to only read secrets and mount it as a volume to the containers, but not write secrets to keyvault by the eck operator.

---

<div class="post-metadata">

**Author:** ![sebgl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebgl/32/48702_2.png) [@sebgl](https://discuss.elastic.co/u/sebgl)\
**Post date:** [October 25, 2021, 8:27am UTC](https://discuss.elastic.co/t/removing-elastic-user-secret-from-k8s-secrets/287544/2 "2021-10-25T08:27:21Z")

</div>

If you delete this secret, it will be recreated automatically by the operator.  
This secret is intended as a way for users to discover the password of the default elastic user that has been created for them. It is not mounted in any Pod by the operator.

---

<div class="post-metadata">

**Author:** ![x00m](https://avatars.discourse-cdn.com/v4/letter/x/90db22/32.png) [@x00m](https://discuss.elastic.co/u/x00m)\
**Post date:** [October 25, 2021, 12:29pm UTC](https://discuss.elastic.co/t/removing-elastic-user-secret-from-k8s-secrets/287544/3 "2021-10-25T12:29:08Z")

</div>

Thanks for the input. How does the operator create the secret ?  
Is there a way to create the secret elsewhere and not k8s secret ?

---

<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:** [November 22, 2021, 12:30pm UTC](https://discuss.elastic.co/t/removing-elastic-user-secret-from-k8s-secrets/287544/4 "2021-11-22T12:30:06Z")

</div>

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