Error aks , kubernetes => HelmDeploy task throws error ‘unknown flag: — wait’ while running ‘helm init — wait — client-only’ on Helm 3.0.2 version.

NHAILA Achraf
2 min readMar 16, 2023

--

When i execute

helm upgrade -namespace app-prod-eu -install -recreate-pods -values /azp/agent/_work/r8/a/_EU_Build/values.yaml -wait app-prod-eu /azp/agent/_work/r8/a/_Build/prod-app

task throws error :

Flag — recreate-pods has been deprecated, functionality will no longer be updated. Consult the documentation for other methods to recreate pods

Error: UPGRADE FAILED: timed out waiting for the condition

this the explanation:

HelmDeploy task throws error ‘unknown flag: — wait’ while running ‘helm init — wait — client-only’ on Helm 3.0.2 version.

The --wait flag is not supported in Helm 3.0.2, which could be the reason why you are getting the unknown flag error. This flag was only available in Helm 2 and was removed in Helm 3.

In Helm 3, the --wait flag has been replaced by the --timeout flag, which allows you to specify the maximum amount of time to wait for an operation to complete. If the operation does not complete within the specified timeout period, Helm will return an error.

Flag — recreate-pods has been deprecated, functionality will no longer be updated. Consult the documentation for other methods to recreate pods

Error: UPGRADE FAILED: timed out waiting for the condition

To fix the error, you can remove the --wait flag from your helm init command and replace it with the --timeout flag. Here's an example command that you can use:

helm init --client-only --timeout 300s

In this example, the --client-only flag tells Helm to install only the client-side components and not the server-side components, and the --timeout flag specifies a timeout of 300 seconds (5 minutes). You can adjust the timeout value to suit your needs.

Or if you’re using AKS service simply disable the option wait from UI

Hope this will help!

--

--