Skip to content
Latchkey

Helm "query: failed to query with labels" (Helm 2 to 3) in CI

Helm 3 stores releases as secrets in the release namespace, while Helm 2 stored them as ConfigMaps in kube-system via Tiller. A Helm 3 client querying for a Helm 2 release finds nothing and reports "failed to query with labels".

What this error means

helm list/status/upgrade with Helm 3 fails with "Error: query: failed to query with labels:" or simply shows no releases that Helm 2 created.

helm
Error: query: failed to query with labels: ...
# or: helm list shows no releases that were created with Helm 2 / Tiller

Common causes

Releases still live in Helm 2 storage

The release history is in kube-system ConfigMaps from Tiller, which a Helm 3 client does not read.

A storage-backend or namespace mismatch

Helm 3 looks for release secrets in the target namespace; if the data is elsewhere (or in the old format), the labeled query returns nothing.

How to fix it

Migrate releases with the 2to3 plugin

  1. Install the official helm-2to3 plugin.
  2. Convert each release so its history moves into Helm 3 secret storage.
  3. Confirm with helm list under Helm 3.
Terminal
helm plugin install https://github.com/helm/helm-2to3
helm 2to3 convert my-app
helm list -n prod

Target the correct namespace and backend

Ensure the Helm 3 command points at the namespace where the release secrets live, since Helm 3 storage is namespace-scoped.

Terminal
helm list --all-namespaces

How to prevent it

  • Complete the Helm 2 to 3 migration with helm-2to3 before relying on Helm 3 pipelines.
  • Run Helm commands against the namespace that holds the release secrets.
  • Avoid mixing Helm 2 and Helm 3 clients against the same releases.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →