When trying to delete TKGs (vSphere with Tanzu) clusters that have already been removed from vSphere, from the Kubernetes Containers Plugin in Cloud Director, error messages can be seen in the failed tasks:
Debug Information:
This issue occurs if the cluster has been deleted within vSphere itself first.
As Cloud Director did not initiate the operation, it will still contain references to entities that no longer exist.
Performing operations on Cloud Director managed objects outside of Cloud Director will generally result data integrity issues between Cloud Director and the other solution.
All actions should be performed via Cloud Director unless explicitly stated by VMware Engineering, Documentation or a Knowledge Base Article.
To workaround the issue, you will need to remove the entity definition for the cluster via the Cloud Director Open API.
As the API is based on the Open API, you can leverage the API Explorer to remove the object, or you can use a REST client such as Postman or other.
DELETE
https://<vcd-fqdn>/cloudapi/1.0.0/entities/{cluster-id}?invokeHooks=false
Note: