HELM_API_VERSION_MISMATCH cicd config_error ai_generated true

Error: UPGRADE FAILED: failed to decode: unable to find api-versions for 'networking.k8s.io/v1beta1/Ingress'. The chart may be incompatible with the cluster version.

ID: cicd/helm-deploy-failed-no-api-versions

Also available as: JSON · Markdown · 中文
87%Fix Rate
85%Confidence
1Evidence
2023-09-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
Helm 3.12 active
Helm 3.13 active
Kubernetes 1.22 active
Kubernetes 1.24 active
Kubernetes 1.27 active

Root Cause

A Helm chart references a deprecated Kubernetes API version (e.g., networking.k8s.io/v1beta1) that is no longer available in the target cluster (e.g., Kubernetes 1.22+), causing the deployment to fail.

generic

中文

Helm Chart 引用了已弃用的 Kubernetes API 版本(例如 networking.k8s.io/v1beta1),该版本在目标集群中不再可用(例如 Kubernetes 1.22+),导致部署失败。

Official Documentation

https://helm.sh/docs/topics/kubernetes_apis/

Workarounds

  1. 90% success Update the chart to use the equivalent stable API version: replace 'networking.k8s.io/v1beta1' with 'networking.k8s.io/v1' for Ingress, or use 'apps/v1' for Deployments.
    Update the chart to use the equivalent stable API version: replace 'networking.k8s.io/v1beta1' with 'networking.k8s.io/v1' for Ingress, or use 'apps/v1' for Deployments.
  2. 85% success Use the 'helm mapkubeapis' plugin to automatically migrate deprecated API versions in the chart before deployment.
    Use the 'helm mapkubeapis' plugin to automatically migrate deprecated API versions in the chart before deployment.
  3. 80% success Pin the chart to a version that supports the target cluster's API versions by specifying a chart version in the Helm command or requirements.yaml.
    Pin the chart to a version that supports the target cluster's API versions by specifying a chart version in the Helm command or requirements.yaml.

中文步骤

  1. Update the chart to use the equivalent stable API version: replace 'networking.k8s.io/v1beta1' with 'networking.k8s.io/v1' for Ingress, or use 'apps/v1' for Deployments.
  2. Use the 'helm mapkubeapis' plugin to automatically migrate deprecated API versions in the chart before deployment.
  3. Pin the chart to a version that supports the target cluster's API versions by specifying a chart version in the Helm command or requirements.yaml.

Dead Ends

Common approaches that don't work:

  1. 85% fail

    --force only replaces resources; it does not change the API version requirements.

  2. 80% fail

    The Helm client only sends the manifest; the cluster rejects unknown API versions.

  3. 90% fail

    The same chart manifest is used, so the same API version error will occur.