Aller au contenu

Blackbox-exporter - k8s 1.25 post-upgrade steps#

Introduction#

This procedure needs to be applied after a cluster upgrade in 1.25, due to an incompatibility between K8s 1.25 version and the Caascad current versions of blackbox-exporter.

In order to fix blackbox-exporter on a cluster that has been upgraded in 1.25, you need to force remove the old version of blackbox-exporter and install a more recent version.

Steps#

  1. Remove blackbox-exporter secrets:

    kswitch ${ZONE}
    kubectl get secrets -n <namespace> | grep sh.helm.release.v1.blackbox-exporter.v # to identify the secrets names
    kubectl delete secrets sh.helm.release.v1.blackbox-exporter.v1 -n <namespace>
    kubectl delete secrets sh.helm.release.v1.blackbox-exporter.v2 -n <namespace>
    ...
    
    Where namespace can be:

    • monitoring for cloud and infra zones;
    • caascad-monitoring for client zones.
  2. Deleting the secrets, causes the uninstallation of blackbox-exporter helm chart. Check it is not present anymore:

    kswitch ${ZONE}
    helm list -a -n  <namespace> | grep blackbox-exporter # to identify the chart name
    

    In case the helm chart is still present, force the uninstall:

    helm uninstall blackbox-exporter -n <namespace> --force
    

  3. Install blackbox-exporter:

    cd ${ENVS_NG}/contexts/caascad
    trackbone apply -c <blackbox-exporter-configuration> -z ${ZONE}
    
    Where <blackbox-exporter-configuration> can be:

    • blackbox-exporter-core-client for client zone;
    • blackbox-exporter-core-cloud-caascad for cloud zones;
    • blackbox-exporter-core-cloud-client for cloud zones;
    • blackbox-exporter-core-infra-caascad for infra zones.
  4. Check blackbox-exporter pod status and logs.