# Using Keystores - not working (v6.6.0)

**URL:** https://discuss.elastic.co/t/using-keystores-not-working-v6-6-0/273362
**Category:** Beats
**Tags:** metricbeat
**Created:** [May 19, 2021, 5:31am UTC](https://discuss.elastic.co/t/using-keystores-not-working-v6-6-0/273362 "2021-05-19T05:31:53Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![anaconda2196](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anaconda2196/32/88937_2.png) [@anaconda2196](https://discuss.elastic.co/u/anaconda2196)
#### Post date: [May 19, 2021, 5:31am UTC](https://discuss.elastic.co/t/using-keystores-not-working-v6-6-0/273362/1 "2021-05-19T05:31:53Z")

</div>

Hello,

I'm trying to use a keystore value in my metricbeatbeat configuration and I can't seem to get it working...

I have created initContainer in that I am just creating keystore and add my elasticsearch password in ES\_PWD!

```
metricbeat --path.config=/usr/share/metricbeat/keystore -c /etc/metricbeat.yml keystore create
echo 'my-ES-clear-text-pwd' | metricbeat --path.config=/usr/share/metricbeat/keystore -c /etc/metricbeat.yml keystore add ES_PWD --stdin --force 
metricbeat --path.config=/usr/share/metricbeat/keystore -c /etc/metricbeat.yml keystore list

```

[sharing volumes between initContainer and actual container!]

In actual metricbeat container trying to run metricbeat service but it is not starting.  
(./metricbeat --path.config=/usr/share/metricbeat/keystore -c /etc/metricbeat.yml -e)

However pod is running but metricbeat service is not starting up inside it!

If i exec into pod and manually copy metricbeat.keystore from --path.config=/usr/share/metricbeat/keystore to --path.data (/usr/share/metricbeat) and if I try to run metricbeat service manually then it is running. (./metricbeat -c /etc/metricbeat.yml -e -system.hostfs=/hostfs)

I found one similar issue: [Using Keystores - not working (v6.6.0)](https://discuss.elastic.co/t/using-keystores-not-working-v6-6-0/167301)

However, I can't do it manually every time since my metricbeat pod is deploy as daemonset and deployment in my K8s cluster.

Thanks in advance.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 20, 2021, 1:49am UTC](https://discuss.elastic.co/t/using-keystores-not-working-v6-6-0/273362/2 "2021-05-20T01:49:58Z")

</div>

If you're using 6.6 please note that it has been [EOL](https://www.elastic.co/support/eol) for quite some time now, and you would be best off upgrading and seeing if the issue is still there.

---

<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: [June 17, 2021, 3:50am UTC](https://discuss.elastic.co/t/using-keystores-not-working-v6-6-0/273362/3 "2021-06-17T03:50:49Z")

</div>

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