Documentation forSolarWinds Observability

Handle Helm chart installation failures

Occasionally, the installation of a Helm chart may fail due to certain policies enforced within the cluster. To address such scenarios, see the instructions below.

Identify the issue

  1. Review installation errors.

    • Look into the error messages provided during the Helm installation failure.

    • Use kubectl get events --sort-by='.metadata.creationTimestamp' -n YourNamespace to review recent events in the namespace where the installation was attempted.

  2. Check cluster policies.

    • Ensure that your configuration values within the Helm chart comply with the existing policies in your cluster.

    • For instance, a feature like AutoUpdate may not comply with certain cluster policies as it requires permissions to update almost any resource within the cluster. Make sure the configurations for such features adhere to your cluster's policies. You can also disable the feature.

  3. Disable automatic cleanup after a failed installation to collect additional information.

    • After a failed installation or upgrade, the default installation commands try to cleanup any K8s resources created during the process. However, that may remove also information about why the installation/upgrade failed.

    • To prevent that for installation, run

      helm install -f values.yaml swo-k8s-collector solarwinds/swo-k8s-collector --namespace <YourK8sNamespace> --wait
      instead of
      helm install -f values.yaml swo-k8s-collector solarwinds/swo-k8s-collector --namespace <YourK8sNamespace> --atomic

    • And for upgrade, run

      helm upgrade swo-k8s-collector solarwinds/swo-k8s-collector --namespace <YourNamespace> --wait
      instead of
      helm upgrade swo-k8s-collector solarwinds/swo-k8s-collector --namespace <YourNamespace> --cleanup-on-fail --atomic

    • This will keep all created resources in the K8s cluster also in case of a failure and will allow you to inspect their logs, configuration, etc.

Resolve the issue

By diligently reviewing error messages, aligning your Helm chart configurations with cluster policies, and ensuring a clean slate before re-installation, you enhance the likelihood of a successful deployment.

  1. Modify the Helm chart configuration to align with cluster policies by updating the values.yaml file or providing override values.

  2. Uninstall the failed Helm chart installation.

    Before attempting re-installation, clean up the failed installation to prevent any conflicts or resource leaks.

    Execute helm uninstall RELEASE_NAME -n YourNamespace to remove the failed installation, replacing RELEASE_NAME with the name of your release and YourNamespace with the appropriate namespace.

  3. Re-install the Helm chart. After making the necessary modifications, use the helm install command to start the Helm chart installation.

  4. Verify the installation was successful.

    • Make sure all resources are deployed successfully and are operating as expected.

    • Use helm status RELEASE_NAME -n YourNamespace to check the status of your release.