You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

升级Prometheus Helm Chart时遇PodDisruptionBudget验证错误求解决

解决Helm升级Prometheus时的PodDisruptionBudget字段错误

问题根源

Kubernetes的io.k8s.api.policy.v1.PodDisruptionBudgetSpec结构中不存在enabled字段,你在Helm values配置里错误地将enabled放在了podDisruptionBudget.spec层级下,触发了API验证失败。

解决方案

  • 修正values.yaml配置
    把enabled字段移到podDisruptionBudget的顶层,而非spec内部:
    错误配置示例:

    podDisruptionBudget:
      spec:
        enabled: true
        minAvailable: 1
    

    正确配置示例:

    podDisruptionBudget:
      enabled: true
      spec:
        minAvailable: 1
    
  • 升级Prometheus Helm Chart
    若使用的是旧版Chart,可能存在配置映射bug。更新到最新稳定版的Prometheus社区Chart即可修复这类字段映射问题:

    helm repo update prometheus-community
    helm upgrade prometheus prometheus-community/prometheus -f your-values.yaml
    
  • 临时应急方案(不推荐)
    若需紧急完成升级,可临时跳过K8s API验证,但后续必须修正配置:

    helm upgrade prometheus prometheus-community/prometheus -f your-values.yaml --validate=false
    

    注意:跳过验证可能引入其他配置风险,仅作为临时手段。

内容的提问来源于stack exchange,提问作者Himanshu Gude

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.11 01:20:31