If a Helm deployment's status is failed
, what can I do to determine what made it fail?
Helm chart deployment can fail because of the below 3 reasons.
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.
helm history <chartname>
Shows the kubernetes errors for the attempted deployment of that chart.
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.