helm test failure: timed out waiting for the condition

8/22/2018

We have a simple release test for a Redis chart. After running helm test myReleaseName --tls --cleanup, we got

RUNNING: myReleaseName-redis
ERROR: timed out waiting for the condition

There are several issues in Github repository at https://github.com/helm/helm/search?q=timed+out+waiting+for+the+condition&type=Issues but I did not find a solution to it.

What's going on here?

-- Tai
kubernetes
kubernetes-helm

1 Answer

8/22/2018

This first looks puzzling and shows little information because --cleanup will kill the pods after running. One can remove it to get more information. I, thus, reran the test with

helm test myReleaseName --tls --debug

Then use kubectl get pods to examine the pod used for testing. (It could be of other names.)

NAME                                                 READY     STATUS             RESTARTS   AG
myReleaseName-redis                                            0/1       ImagePullBackOff   0          12h

From here, it is more clear now that there is something wrong with images, and it turned out that the link used to pull the image is not correct. (Use kubectl describe pod <pod-name> and then you can find the link you used to pull the image.)

Fix the link, and it worked.

-- Tai
Source: StackOverflow