Upgrading TKC cluster on TMC may get stuck with the following error:
API Error: Failed to upgrade cluster: (target=mc:XX, intentId=XX): Operation cannot be fulfilled on tanzukubernetesclusters.run.tanzu.vmware.com "XX": the object has been modified; please apply your changes to the latest version and try again (failed precondition)"
This API error means the data in TMC database and management cluster are not consistent.
kubectl -n vmware-system-tmc logs -l "app=agent-updater" > agent-updater.log kubectl -n vmware-system-tmc describe pod -l "app=agent-updater" > agent-updater-describe.log kubectl -n vmware-system-tmc logs -l "app=sync-agent" > sync-agent.log kubectl -n vmware-system-tmc describe pod -l "app=sync-agent" > sync-agent-describe.log
kubectl -n vmware-system-tmc delete pod -l "app=agent-updater" kubectl -n vmware-system-tmc delete pod -l "app=sync-agent"
Upgrading the k8s clusters from TMC UI cannot be triggered.