Reputation: 4431
When using helm install/upgrade in some percentage of the time I get this failure:
Failed to install app MyApp. Error: UPGRADE FAILED: timed out waiting for the condition
This is because the app sometimes needs a bit more time to be up and running.
When I get this message helm doesn't stop the install/upgrade, but still works on it, which will be succeed by the end. And my whole cluster will be fully functional.
However helm still shows this failed status for the release.
On one hand it is pretty annoying, on the other hand it can mess up a correctly installed release.
How to remove this false error and get into a 'deployed' state(without a new install/upgrade)?
Upvotes: 1
Views: 8222
Reputation: 13908
What you might find useful here are the two following options:
--wait
: Waits until all Pods are in a ready state, PVCs are bound, Deployments have minimum (Desired
minusmaxUnavailable
) Pods in ready state and Services have an IP address (and Ingress if a LoadBalancer) before marking the release as successful. It will wait for as long as the--timeout
value. If timeout is reached, the release will be marked asFAILED
. Note: In scenarios where Deployment has replicas set to 1 andmaxUnavailable
is not set to 0 as part of rolling update strategy,--wait
will return as ready as it has satisfied the minimum Pod in ready condition.
--timeout
: A value in seconds to wait for Kubernetes commands to complete This defaults to 5m0s
Helm install and upgrade commands include two CLI options to assist in checking the deployments: --wait
and --timeout
. When using --wait
, Helm will wait until a minimum expected number of Pods in the deployment are launched before marking the release as successful. Helm will wait as long as what is set with --timeout
.
Also, please note that this is not a full list of cli flags. To see a description of all flags, just run helm <command> --help
.
If you want to check why your chart might have failed you can use the helm history
command.
Upvotes: 3