Using Keystores - not working (v6.6.0)

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)

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.

If you're using 6.6 please note that it has been EOL for quite some time now, and you would be best off upgrading and seeing if the issue is still there.

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