Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

update prometheus charts from prometheus-operator to kube-prometheus-stack

Recently prometheus-operator chart is deprecated and the chart has been renamed kube-prometheus-stack to more clearly reflect that it installs the kube-prometheus project stack, within which Prometheus Operator is only one component.

I checked both old and new chart and also I read all related documentation, but I couldn't find changes in the files(especially in values.yaml), could someone explain me to migrate from prometheus-operator to kube-prometheus-stack what I should do exactly?

like image 511
sasan Avatar asked Nov 07 '22 04:11

sasan


1 Answers

March 18, 2021.

I migrated from prometheus-operator to kube-prometheus-stack and faced some difficulties.

Below is a list of errors which I encountered and the steps I took to work-around this.


Error 1: unknown field "metricRelabelings".

Solution: Comment out all appearances.


Error 2: unknown field "relabelings".

Solution: Comment out all appearances.


Error 3: unknown field "selector" in com.coreos.monitoring.v1.Alertmanager.spec.storage.volumeClaimTemplate.

Solution: Comment out all this specific field under the volumeClaimTemplate.


Error 4: unknown field "shards" in com.coreos.monitoring.v1.Prometheus.spec.

Solution: Comment out the specific location, or follow suggestions from here.


Error 5: prometheus-kube-stack unknown fields probenamespaceselector and probeSelector.

Solution: As mentioned in here, Delete all CRDs:

kubectl delete crd prometheuses.monitoring.coreos.com
kubectl delete crd prometheusrules.monitoring.coreos.com
kubectl delete crd servicemonitors.monitoring.coreos.com
kubectl delete crd podmonitors.monitoring.coreos.com
kubectl delete crd alertmanagers.monitoring.coreos.com
kubectl delete crd thanosrulers.monitoring.coreos.com

And ran helm install again.


Link to the chart issues page in Github.

like image 153
RtmY Avatar answered Nov 15 '22 08:11

RtmY