How can I tell what causes a helm chart deployment to fail?

3/31/2021

If a Helm deployment's status is failed, what can I do to determine what made it fail?

-- Nomnom
kubernetes
kubernetes-helm
rancher

3 Answers

3/31/2021

Helm chart deployment can fail because of the below 3 reasons.

  1. Chart is incorrect
  2. Deployment configurations are incorrect.
  3. Problem in Scheduling the containers and service due to some issue(image pull issue, resource quota)

The following steps can be performed for debugging.

Chart correctness check

Check the correctness of the chart using helm lint in local

helm lint PATH [flags] Ref: https://helm.sh/docs/helm/helm_lint/

Deployment configuration correctness check

Check the correctness of the proposed deployment configuration using the flag --dry-run --debug

helm install <ChartName> --dry-run --debug

Kubernetes cluster Deployment issue check

To check the issues such as whether container creation is failing due to image pull failure or the pods are not getting scheduled due to resource crunch perform the following diagnostic.

Please add the namespace flag in each of the commands if your deployment is getting deployed in a particular namespace ( append -n <yournamespace_name>). Look out for the items which are relevant to your helm chart.

kubectl get deployment

kubectl describe deployment <deployment_id_found_in_previos_step>

kubectl get rs

kubectl describe rs <resource_set_id_found_in_previos_step>

kubectl get pods

kubectl describe pods <pod_id_found_in_previos_step>

See the output of each of the above-mentioned commands.

-- Amit Meena
Source: StackOverflow

11/30/2021

helm history <chartname>

Shows the kubernetes errors for the attempted deployment of that chart.

-- 70Mike
Source: StackOverflow

3/31/2021

Append the below parameters to the helm install command to validate the syntax and the command

--dry-run --debug

if the command works, then go ahead and run skipping the above parameters.

-- P Ekambaram
Source: StackOverflow