SOLVED: Error UPGRADE FAILED unable to build kubernetes objects from current release manifest

problem

We has a service that had not been deployed in a while and since then we have upgraded our since then we upgraded our Kubernetes cluster to version 1.3.0. This upgrade included the deprecation of the autoscaling/v2beta2 API (deprecated 1.2.6), which was used by the service's HorizontalPodAutoscaler (HPA). Some how the object was deleted and attempting to upgrade the application's Helm chart resulted in the following error:

Error: UPGRADE FAILED: unable to build kubernetes objects from current release manifest: resource mapping not found for name: "" namespace: "" from "": no matches for kind "HorizontalPodAutoscaler" in version "autoscaling/v2beta2"

solution

This error indicates that Helm was unable to retrieve the current release manifest because the HorizontalPodAutoscaler (HPA) object was missing. Furthermore, our Kubernetes version (1.3.0) no longer supports the autoscaling/v2beta2 API version required by the missing HPA. The resolution involved updating the API versions within our release manifest using helm-mapkubeapis

> helm plugin install https://github.com/helm/helm-mapkubeapis

Are you sure you want to proceed with this operation (install) on the above context? (y/N) y

Downloading and installing helm-mapkubeapis v0.5.2 ...
https://github.com/helm/helm-mapkubeapis/releases/download/v0.5.2/helm-mapkubeapis_0.5.2_linux_amd64.tar.gz
Installed plugin: mapkubeapis
> helm [helm-mapkubeapis](https://github.com/helm/helm-mapkubeapis) -n <namespace> <chart>

'chart' will be checked for deprecated or removed Kubernetes APIs and will be updated if necessary to supported API versions.
Get release 'chart' latest version.
Check release 'chart' for deprecated or removed APIs...
Found 1 instances of deprecated or removed Kubernetes API:
"apiVersion: autoscaling/v2beta2
kind: HorizontalPodAutoscaler
"
Supported API equivalent:
"apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
"
Finished checking release 'chart' for deprecated or removed APIs.
Deprecated or removed APIs exist, updating release: zensa-web.
Set status of release version 'chart.v1' to 'superseded'.
Release version 'chart.v1' updated successfully.
Add release version 'chart.v2' with updated supported APIs.
Release version 'chart.v2' added successfully.
Release 'chart' with deprecated or removed APIs updated successfully to new version.
Map of release 'chart' deprecated or removed APIs to supported versions, completed successfully.
Next
Next

what is platform orchestration?