Upgrade and Uninstall

Robusta is upgraded using helm upgrade. For detailed instructions, see Helm Upgrade.

Helm Upgrade

Note

If your install bundles kube-prometheus-stack (enablePrometheusStack: true) and you are upgrading to Robusta 0.56.0 or later from an earlier version, follow the Robusta Classic: Manual Upgrade steps instead. They update the Prometheus Operator CRDs before running the Helm upgrade.

Find the Helm values that you installed Robusta with (typically a generated_values.yaml file). You'll need this to preserve settings during the upgrade.

Where is my generated_values.yaml?

If you lost your generated_values.yaml file, you can extract it from a cluster running Robusta:

helm get values -o yaml robusta > generated_values.yaml

Now do a helm upgrade, passing your existing settings:

helm repo update
helm upgrade robusta robusta/robusta -f ./generated_values.yaml --set clusterName=<YOUR_CLUSTER_NAME>

Warning

Do not run helm upgrade --reuse-values

The --reuse-values flag keeps the previous version's default values, so changes to the chart's defaults are not applied. Several defaults were changed in Robusta 0.56.0 to be more secure, and an upgrade with this flag does not pick them up. Always pass your values file with -f, as shown above.

For background, see how the --reuse-values flag works.

Verify that Robusta is running and there are no errors in the logs:

kubectl logs -n <NAMESPACE> -l app=robusta-runner

Installing pre-releases

Install beta version of Robusta with helm upgrade --devel.

Uninstall

You can uninstall Robusta as follows:

helm uninstall robusta

Robusta Classic: Manual Upgrade

Note

This section only applies to older Robusta Classic installs that bundled kube-prometheus-stack (enablePrometheusStack: true). New installs do not need this and can use the Helm Upgrade above.

Does my upgrade require manual steps?

A manual upgrade is only relevant for older Robusta Classic installs that bundled kube-prometheus-stack (enablePrometheusStack: true). You need it when upgrading to Robusta 0.56.0 or later from an earlier version, or if helm upgrade fails with a com.coreos.monitoring.v1.Prometheus.spec error.

In all other cases, you can do a Helm Upgrade and no more.

Why are manual upgrades necessary?

Older Robusta Classic versions bundled kube-prometheus-stack, which uses CRDs. Helm can't update CRDs, so we updated them manually. See the Helm Documentation on CRDs for details.

Manual upgrade instructions

Robusta 0.56.0 upgrades the bundled kube-prometheus-stack from version 72 to 93, which requires Kubernetes 1.25 or later. For everything that changed between those versions, see the kube-prometheus-stack upgrade notes.

  1. If you are upgrading from a Robusta version older than 0.26.0, manually remove the node-exporter daemonset and admission webhooks. Skip this step otherwise.

Warning

These commands select by label, so they also match another kube-prometheus-stack release in the same cluster. If you run one independently of Robusta, list the matching objects first (replace delete with get) and delete only the ones that belong to the Robusta release.

kubectl delete daemonset -l app=prometheus-node-exporter
kubectl delete validatingwebhookconfigurations.admissionregistration.k8s.io -l app=kube-prometheus-stack-admission
kubectl delete MutatingWebhookConfiguration -l app=kube-prometheus-stack-admission
  1. Manually update the Prometheus Operator CRDs. For more info, refer to the kube-prometheus-stack docs.

Warning

If you have an existing Prometheus Operator installed independently of Robusta then be very careful! Upgrading CRDs will impact all Prometheus Operators in your cluster.

for crd in alertmanagerconfigs alertmanagers podmonitors probes prometheusagents prometheuses prometheusrules scrapeconfigs servicemonitors thanosrulers; do
  kubectl apply --server-side --force-conflicts -f "https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.95.2/example/prometheus-operator-crd/monitoring.coreos.com_${crd}.yaml"
done
  1. If you're upgrading from Robusta v0.10.27 or below and using thanos please check if you need to adapt your config according to the kube-prometheus-stack upgrade docs.

  2. Update Robusta with Helm. If you've lost generated_values.yaml, you can extract it from the cluster.

helm repo update
helm upgrade robusta robusta/robusta -f ./generated_values.yaml --set clusterName=<YOUR_CLUSTER_NAME>

Warning

Do not run helm upgrade --reuse-values. It keeps the previous version's default values, so changed defaults are not applied.

  1. Verify that Robusta is running and there are no errors in the logs:

kubectl logs -n <NAMESPACE> -l app=robusta-runner