# 升级失败：客户端版本[v3.10.0]与服务器版本[v3.8.0]不兼容

- **ID:** `cicd/helm-upgrade-failed-incompatible-versions`
- **领域:** cicd
- **类别:** config_error
- **错误码:** `HELM_VERSION_MISMATCH`
- **验证级别:** ai_generated
- **修复率:** 79%

## 根因

Helm客户端和Tiller/服务器版本不匹配，或者在Helm v3中，安装的chart版本与集群的Helm SDK版本因API变更而不兼容。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Helm v3.8.0 | active | — | — |
| Helm v3.10.0 | active | — | — |
| Helm v3.12.0 | active | — | — |
| Kubernetes 1.25 | active | — | — |

## 解决方案

1. ```
   Upgrade Helm client to match server: `curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash -s -- --version v3.8.0`
   ```
2. ```
   Use helm template to render locally and apply with kubectl, bypassing Helm server: `helm template release-name chart/ > manifest.yaml && kubectl apply -f manifest.yaml`
   ```
3. ```
   In CI/CD, pin Helm version in setup step: `uses: azure/setup-helm@v3 with helm-version: '3.8.0'`
   ```

## 无效尝试

- **** — --force only reapplies resources; does not fix version incompatibility; may cause resource conflicts. (65% 失败率)
- **** — Cluster downgrade is risky and may break other services; not practical for production. (80% 失败率)
- **** — Reinstall doesn't change the server version; the cluster's Helm SDK is embedded in the tiller or in-cluster agent. (50% 失败率)
