After upgrading VMware Cloud Foundation (VCF) Automation to version 9.0.1, you may encounter an issue where existing vSphere Kubernetes Service (VKS) projects and clusters are no longer visible in the VCF Automation UI. The Kubernetes management page appears empty, preventing any cluster management operations for those projects.
This behavior is caused by a stale project entry referencing an organization that no longer exists, which prevents the project service from loading correctly.
VMware Cloud Foundation (VCF) 9.0.1
The root cause is a stale project record in the project_db database. This record contains an org_id that is no longer present in the tenant-manager database. When the project-service-app attempts to load project details, it fails with a Cannot load details from TM for org with id error, which results in a 500 error and prevents any projects from being displayed in the UI.
This issue is resolved in VCF Automation versions 9.0.2 and 9.1. For older versions, the following workaround can be used.
First, confirm that the issue is caused by a non-existent organization ID referenced in the project service.
sudo su -
KUBECONFIG environment variable to interact with the Kubernetes cluster.
export KUBECONFIG=/etc/kubernetes/admin.conf
resource-manager pod to trigger the service startup logic and generate the relevant error.
kubectl get pods -n prelude | grep resource-manager
kubectl delete pod -n prelude <resource-manager-pod-name>
project-service-app log for the specific error. The presence of this error confirms the issue. Take note of the org_id from the error message.
grep -i 'Cannot load details' /var/log/services-logs/prelude/project-service-app/file-logs/project-service-app.log
Example Error:
Cannot load details from TM for org with id: db6fd39f-0160-4819-9b9f-3b0a76253692
Warning: Manual Database Modification
The following procedure involves direct modification of the product database. Proceed with caution.
While still logged into the appliance as root with the KUBECONFIG variable set:
kubectl exec -i -t -n prelude vcfapostgres-0 -- /bin/bash
tenant-manager database to verify which organizations currently exist.
psql -U postgres tenantmanager
org_id from the log error is not in this list.
SELECT * from organization;
tenant-manager database by typing \q and pressing Enter.project_db database.
psql -U postgres project_db
org_id.
SELECT * from project;
org_id. Be sure to replace <org_id_to_delete> with the actual ID from the log error.
DELETE FROM project WHERE org_id = '<org_id_to_delete>';
\q) and then exit the pod shell (exit).resource-manager pod one last time and verify that it starts correctly without errors.
kubectl delete pod -n prelude <resource-manager-pod-name>