HELM_API_VERSION_MISMATCH cicd config_error ai_generated true

错误:升级失败:解码失败:无法找到 'networking.k8s.io/v1beta1/Ingress' 的 API 版本。该 Chart 可能与集群版本不兼容。

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

其他格式: JSON · Markdown 中文 · English
87%修复率
85%置信度
1证据数
2023-09-01首次发现

版本兼容性

版本状态引入弃用备注
Helm 3.12 active
Helm 3.13 active
Kubernetes 1.22 active
Kubernetes 1.24 active
Kubernetes 1.27 active

根因分析

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

English

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

官方文档

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

解决方案

  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.

无效尝试

常见但无效的做法:

  1. 85% 失败

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

  2. 80% 失败

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

  3. 90% 失败

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