Unable to deploy management cluster as management cluster deployment is marked as failed.
You may get this message on the TCA UI:
Unable to create cluster ClusterName Reason: Cluster has exist in /root/.config/tanzu/config.yaml, please check! If this is invalid cluster data left before, manually delete it.Login to TCA-CP or Collect TechSupport Bundle of TCA-CP for the logs.
Some resources can't be deleted from bootstrap cluster, so Tanzu CLI reports errors. The management cluster deletion is stuck there, even if deletion operation is performed multiple times. Since the management cluster status is Failed, we need to manually delete leftover resources related with the management cluster.
Left-over resources related with the failed management cluster needs to be manually deleted.
kubectl get <crName> -n <namespace>
kubectl delete <crName> <managementCluster> -n <namespace>
tanzu config server delete <namespace>
kubectl get ns <namespace>
kubectl delete ns <namespace>