kubernetes
config_error
ai_generated
true
错误:升级失败:值不符合以下图表模板的规范:模板"deployment.yaml"缺少必需的值
Error: UPGRADE FAILED: values don't meet the specifications of the following chart templates: template "deployment.yaml" is missing required values
ID: kubernetes/helm-upgrade-failed-missing-values
87%修复率
88%置信度
1证据数
2024-02-10首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| Helm v3.14.0 | active | — | — | — |
| Helm v3.13.3 | active | — | — | — |
| Kubernetes v1.28.4 | active | — | — | — |
根因分析
Helm升级失败,因为提供的values.yaml缺少图表模板所需的键,通常是由于新图表版本增加了必需字段。
English
Helm upgrade fails because the provided values.yaml is missing required keys that the chart template expects, often due to a new chart version with additional required fields.
官方文档
https://helm.sh/docs/chart_template_guide/values_files/解决方案
-
Inspect the chart for required values: `helm show values <chart-name>` and compare with your values.yaml. Add missing keys, e.g., if the chart requires `service.port`, add `service: {port: 8080}` to your values file. -
Use `helm upgrade --install --dry-run --debug` to see the template rendering errors and identify exactly which values are missing.
无效尝试
常见但无效的做法:
-
Run `helm upgrade --reuse-values` to reuse old values
95% 失败
Reusing old values doesn't supply the missing required keys from the new chart version. It will still fail with the same error.
-
Delete the release and reinstall with `helm install`
80% 失败
Deleting the release may cause data loss (e.g., PVCs may be orphaned). Also, the install will fail for the same reason if values are missing.