0

I deployed a kube-prometheus-stack instance (Prometheus, AlertManager, Grafana) and it's running quite sometimes with data, some custom dashboards, data sources and users.

Now I want to add additionalScrapeConfigs for a newly deploy blackbox-exporter to the existing kube-prometheus-stack to extend the monitoring.

Is there anyway to update existing kube-prometheus-stack file without apply via helm chart? Cuz I'm afraid that helm upgrade new_values.yaml would wipe out all existing data, dashboards, data source and users.

I installed kube-prometheus-stack with these :

helm show values prometheus-community/kube-prometheus-stack > custome-values.yaml

helm install -f ./custome-values.yaml prometheus prometheus-community/kube-prometheus-stack -n monitoring

And deploy blackbox-exporter with this:

helm install prometheus-blackbox-exporter prometheus-community/prometheus-blackbox-exporter -n monitoring
hvas01
  • 1

1 Answers1

0

Helm upgrade of Prometheus release with additional additionalScrapeConfigs does not wipe-out your existing scrape config.

To be more sure of what exactly is being changed (added with your upgrade, I'd suggest you use helm diff plugin.

https://github.com/databus23/helm-diff

Once you install it, run the below command to see a diff of what's being added or being removed then you run the upgrade.

helm diff upgrade -f ./custome-values.yaml prometheus prometheus-community/kube-prometheus-stack -n monitoring

The above command does not run the actual upgrade, it'll only show the diff of change.

Once you've reviewed the changes, run the actual upgrade.

tanmay_bhat
  • 111
  • 4