Database dump with Helm charts

I'm trying to set up an Elasticsearch environment with Kubernetes-Helm-Docker etc. I'm going to enable xpack later on. I want the setup of this environment as automatic as possible.

I would like to have some basic data to be PUT into ES upon deploying an environment like this into a new cluster. Data like index patterns in the .kibana index, default users, some visualizations and so on. So not the -actual- log data or any other business information. I just want to have Kibana ready with all the index patterns after launching this environment without me having to set them up manually.

How can I achieve to have a basic database dump which is put into ES upon every new deployment?

So far the only option I see is setting up CURLs in the data.hooks.preStart part, but I'm not really fond of that because with XPack enabled I would have to store user passwords in plain text.

Any ideas?

Instead of putting the passwords in plain text you can just reference the environment variables (set via Kubernetes secrets). The Elasticsearch chart does something similar with the readinessProbe used for health checks:

And an example of setting the username and password via environment variables:

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