SCENARIO:
Upgrading a TKG Management Cluster (MC) fails.
DETAILS:
Using the tanzu cli to upgrade your Management Cluster.
tanzu management-cluster upgrade
or
tanzu mc upgrade
FAILS with ERROR:
Error: upgrade version compatibility validation failed: unable to parse management cluster version : could not parse "" as version
NOTE: Has been seen to occur when upgrading a MC from multiple source TKG versions to target TKG versions.
For example:
From TKG 2.4.1 to 2.5.1
From TKG 2.5.1 to 2.5.2
The Cluster object associated with the Management Cluster has an empty string value ""
associated with the annotation for TKGVERSION
.
Example:
$ kubectl get clusters -n tkg-system MANAGEMENT_CLUSTER_NAME -o yaml | grep TKGVERSION
TKGVERSION: ""
Whereas, the value of the
TKGVERSION
annotation is expected to be the value of the current TKG version running (before upgrade).
Example. If you are upgrading your MC "from" TKG 2.5.1 to TKG 2.5.2, it should show the value of 2.5.1.
$ kubectl get clusters -n tkg-system MANAGEMENT_CLUSTER_NAME -o yaml | grep TKGVERSION
TKGVERSION: 2.5.1
For more details, refer to Check Your TKG Version
NOTE: There is a workaround. We are asking that Tanzu Customers open a Tanzu Kubernetes Runtime support request so that a Tanzu Engineer can obtain some important data for TKG R&D prior to performing the operation with you.
STEPS: