How to ensure Lifecycle Policy is applied when redeploying Metricbeat in Kubernetes?

Hello,

I had a problem where my Metricbeat index would not update according to the Lifecycle Policy I had set in the config. As it turns out there was a default "metricbeat" Lifecycle Policy active which overrode my configuration. I was able to change the Policy via the Kibana UI but I was wondering if there was a more reliable way to ensure my policy will be used.

I know that you can define a Lifecycle Policy via the index template. Is there a way which would allow me to easily add this to my config automatically?

I am running Metricbeat via Kubernetes and want the policy to always stay active .. for instance if I redeploy Metricbeat I dont want to run the risk of it changing to another default policy.

Hi!

You can define your related configuration in Metricbeat's k8s manifests similarly to what we do in order to configure the output at https://github.com/elastic/beats/blob/751a1d3eb31bf2cb35d39517e2f39c2b36a94a6c/deploy/kubernetes/metricbeat/metricbeat-deployment-configmap.yaml#L22.

C.

1 Like

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