`Error: UPGRADE FAILED: unable to build kubernetes objects from current release manifest: resource mapping not found for name: "shop-api" namespace: "" from "": no matches for kind "PodDisruptionBudget" in version "policy/v1beta1"`
AdvancedTroubleshootingInstall & Upgrade Failures
Answer
Likely causes → The cluster was upgraded and removed an API version that the stored previous release manifest still uses. Helm must parse the old manifest to compute the diff and cannot.
Diagnose →
helm get manifest shop -n shop | grep -B1 -A1 'policy/v1beta1'
kubectl version
Fix →
helm plugin install https://github.com/helm/helm-mapkubeapis
helm mapkubeapis shop -n shop
helm upgrade shop ./shop -n shop -f values-prod.yaml # chart updated to policy/v1
Prevent → Before cluster upgrades, scan releases with pluto detect-helm -o wide and upgrade charts to supported APIs first.
More on Install & Upgrade Failures
`Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress`Beginner`Error: INSTALLATION FAILED: rendered manifests contain a resource that already exists. Unable to continue with install: Service "shop-api" in namespace "shop" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "shop"`Advanced`Error: INSTALLATION FAILED: cannot re-use a name that is still in use`Beginner`Error: UPGRADE FAILED: context deadline exceeded`Beginner`Error: UPGRADE FAILED: release shop failed, and has been rolled back due to atomic being set: context deadline exceeded`Intermediate`Error: UPGRADE FAILED: cannot patch "shop-api" with kind Deployment: Deployment.apps "shop-api" is invalid: spec.selector: Invalid value: v1.LabelSelector{...}: field is immutable`Advanced