# Trying to set elastic user password in ECK 2.6.1

**URL:** <https://discuss.elastic.co/t/trying-to-set-elastic-user-password-in-eck-2-6-1/324898>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Tags:** elastic-stack-security, docker\
**Created:** [February 7, 2023, 12:59pm UTC](https://discuss.elastic.co/t/trying-to-set-elastic-user-password-in-eck-2-6-1/324898 "2023-02-07T12:59:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![screwyy](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@screwyy](https://discuss.elastic.co/u/screwyy)\
**Post date:** [February 7, 2023, 12:59pm UTC](https://discuss.elastic.co/t/trying-to-set-elastic-user-password-in-eck-2-6-1/324898/1 "2023-02-07T12:59:08Z")

</div>

Hello,

I'm trying to set the elastic user password as described [here](https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-users-and-roles.html#k8s-default-elastic-user) and [here](https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-users-and-roles.html)

I receive the following error:

```auto
"unknown secure setting [elastic] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"

```

I used this code which is similar to what the operator creates

```auto
---
apiVersion: v1
kind: Secret
metadata:
  name: logging-es-elastic-user
type: Opaque
data:
  elastic: Q2FPYlFGNjVhMDYxVTAxc0lmdDZ4MTBq

```

and based on the docs tried this:

```auto
---
apiVersion: v1
kind: Secret
metadata:
  name: logging-es-elastic-user
type: kubernetes.io/basic-auth
stringData:
  username: elastic
  password: parola

```

and the error is at the operator

```auto
"Secret \"logging-es-elastic-user\" is invalid: [data[%s][username]: Required value, data[%s][password]: Required value]"

```

by default, created by the operator it looks like this:

```auto
kubectl -n logging get secret/logging-es-elastic-user -oyaml
apiVersion: v1
data:
  elastic: Tzg0V08zNDJUaTdWMTRkT2ZGNjdRT0hE
kind: Secret
metadata:
  creationTimestamp: "2023-02-07T12:57:28Z"
  labels:
    common.k8s.elastic.co/type: elasticsearch
    eck.k8s.elastic.co/credentials: "true"
    eck.k8s.elastic.co/owner-kind: Elasticsearch
    eck.k8s.elastic.co/owner-name: logging
    eck.k8s.elastic.co/owner-namespace: logging
    elasticsearch.k8s.elastic.co/cluster-name: logging
  name: logging-es-elastic-user
  namespace: logging
  resourceVersion: "377972498"
  uid: b319b016-8ef3-49d7-9099-fbbac49c2405
type: Opaque

```

Tried also with `bootstrap.password` like this:

```auto
---
apiVersion: v1
kind: Secret
metadata:
  name: logging-es-elastic-user
type: Opaque
data:
  bootstrap.password: Q2FPYlFGNjVhMDYxVTAxc0lmdDZ4MTBq

```

and the error in elasticsearch container is:

```auto
"error.message":"unknown secure setting [elastic] please check that any required plugins are installed, or check the breaking changes documentation for removed settings"

```

So it's overwriting my `bootstrap.password` with `elastic`...  
So how should the code look like?

---

<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:** [March 7, 2023, 12:59pm UTC](https://discuss.elastic.co/t/trying-to-set-elastic-user-password-in-eck-2-6-1/324898/2 "2023-03-07T12:59:48Z")

</div>

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