Could not connect to vSphere for Kubernetes infrastructure
2025-02-11 11:31:51,611 | ERROR | Backend-activity-pool-373479 | FutureUtil | Provision of WCP firewall policy failed for VDC | requestId=########-####-####-########80e7,request=POST https://vcloud.example.com/cloudapi/1.0.0/edgeGateways/,requestTime=1739273505195,remoteAddress=##.##.##.##:13804,userAgent=PostmanRuntime/7.29.2,accept=application/json;version 39.0.0-alpha;multisite ########-####-####-########3162aa@3e7########-####-####-########1c53 vcd=########-####-####-########1382,task=########-####-####-########833d activity=(com.vmware.vcloud.backendbase.management.system.TaskActivity,urn:uuid:########-####-####-########833d) activity=(com.vmware.vcloud.networking.services.handlerproxy.activity.edges.EdgeGatewayActivity,urn:uuid:########-####-####-########11bf) activity=(com.vmware.ssdc.backend.wcp.RefreshTkgClustersNetworkIsolation,urn:uuid:########-####-####-########11bf) activity=(com.vmware.ssdc.backend.wcp.RefreshTkgClustersNetworkIsolationForVdcs,urn:uuid:########-####-####-########a2ed)com.vmware.ssdc.backend.wcp.WcpConnectionPoolException: Cloud Director cannot reach vSphere for Kubernetes, reason message: Could not connect to vSphere for Kubernetes infrastructure.VMware Cloud Director 10.5.x
One of the Organization VDC is still using the Kubernetes policy
Remove the Kubernetes policy on the Org VDC to ensure that the operation to refresh the TKG clusters is not triggered.
sudo -i -u postgres psql vcloud
Execute the below SQL query and check if there are VDCs with Kubernetes policy:
select * from org_prov_vdc where id in (select vdc_id from vdc_logical_resource where fo_id in (select id from vdc_compute_policy where policy_type='VdcKubernetesPolicy'));