[k8s] Helm upgrade fail due to deprecated K8S APIs version after upgrading Kubernetes version

Julien Chen
1 min readJan 2, 2024

--

Our team use helm to manage K8S resources. Most of helm charts are using helm upgrade — install… to redeploy.

But sometime it failed after we upgraded our K8S version to the latest…

helm upgrade fail due to deprecated api version after upgrading Kubernetes version

It is because some of K8S API are deprecated after upgarding Kubernetes version.

How to solve it?

The easiest way is uninstall your helm apps and reinstall them. But this way will clear all of updating history. So, if you want to keep them. You can:

  1. Follow this Helm official document “Deprecated Kubernetes APIs” to solve this issue.
  2. There is one article “helm upgrade fail after upgrade to Kubernetes 1.25 due to change in HorizontalPodAutoscaler API version” in stackoverflow also has some script can help you.
  3. Or you can choose Helm mapkubeapis Plugin. And do things below:
# 1. Install helm-mapkubeapis
helm plugin install https://github.com/helm/helm-mapkubeapis

# 2. Mapping K8S APIs
helm mapkubeapis <releasename>

# 3. Update API version of helm charts

# 4. Upgrade applications
helm upgrade --install <releasename>

Everything will back to normal.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response