When upgrading a Tanzu Kubernetes Grid Management (TKG-M) cluster from version 1.28.x to 1.29.x in VMware Telco Cloud Automation (TCA) 3.4, the addon upgrade phase fails.
The management cluster becomes unmanageable, and options in the TCA UI appear greyed out.
Environment
VMware Telco Cloud Automation (TCA) 3.4.0.1
Tanzu Kubernetes Grid Management (TKG-M) 2.5.4
Cause
Addon upgrade phase fails with error: INTERNAL_SERVER_ERROR Failed to update addon for cluster. Error: class java.lang.String cannot be cast to class java.util.Map.
Management cluster status in TCA UI is suspended or options are greyed out.
Nodes show version 1.29.15, but LCM operations are blocked.
The kubeconfig-secret in the tca-cp-cn namespace on the TCA Control Plane becomes empty (contains "" instead of a base64 string).
Resolution
To resolve the issue in existing 3.4 environments:
Log in to the TCA-CP VM via SSH as admin and switch to root: sudo su -
Generate a Base64 encoded string of the valid local kubeconfig: cat /etc/kubernetes/admin.conf | base64 -w0
Edit the kubeconfig-secret in the tca-cp-cn namespace:
Manually set the cluster status to ACTIVE in the TCA-M Database if it remains suspended:
To connect TCA-M DB:
kubectl exec -it postgres-0 -n tca-mgr -- psql -d tca -U tca_admin -h localhost
List the management cluster:
select id, val->>'rowType', val->'metadata'->>'name' from "K8sClusterDetails";
Run command to make sure the right management cluster is returned:
select * from "K8sClusterDetails" where id=xxx;
Update the status of the management cluster:
update "K8sClusterDetails" set val = jsonb_set(val, '{status}', '"ACTIVE"') where id=xxx;