Deployment fails after cluster has been upgraded to 1.16 if a removed API version was last used
Problem
When the cluster is upgraded to a version where APIs have been removed, without first doing a helm release with the new API versions, the old helm values will prevent upgrades from working, due to helm not knowing how to parse the old values anymore.
Steps to reproduce
- Deploy using the deprecated APIs (e.g.
extensions/v1beta1
forDeployment
) and K8s < 1.16 - Upgrade the cluster to K8s 1.16 or later, where those APIs have been removed
- Try to deploy again
Expected result
The deployment should succeed
Actual result
The deployment fails with
UPGRADE FAILED
Error: unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1"
Error: UPGRADE FAILED: unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1"
More details
Upstream issue with more info https://github.com/helm/helm/issues/7219
Proposed solution
Document how to solve the problem with helm-mapkubeapis
Edited by Hordur Freyr Yngvason