How would you migrate a release whose stored manifest uses an API removed in the new Kubernetes version?
AdvancedConceptBest Practices & Rapid-Fire Commands
Answer
After a cluster upgrade, Helm cannot build the previous release's objects (unable to build kubernetes objects from current release manifest: resource mapping not found for name: "shop" ... no matches for kind "PodDisruptionBudget" in version "policy/v1beta1"). Fix the stored release with the mapkubeapis plugin, then upgrade with the updated chart:
helm plugin install https://github.com/helm/helm-mapkubeapis
helm mapkubeapis shop -n shop --dry-run
helm mapkubeapis shop -n shop
helm upgrade shop ./shop -n shop -f values-prod.yaml
Prevent it by updating chart API versions and running pluto or kubent before every cluster upgrade.
More on Best Practices & Rapid-Fire Commands
What are your top best practices for chart authoring?IntermediateWhat are your top best practices for releasing with Helm in production?IntermediateHow do you set resource requests and limits in a chart without forcing them on users?IntermediateHow do you keep an HPA and Helm from fighting over `replicas`?AdvancedRapid fire: commands to inspect a release.BeginnerRapid fire: commands to work with charts locally.Beginner