Cluster and Namespace still visible in VCF Automation after manual deletion from vSphere Kubernetes Services.
search cancel

Cluster and Namespace still visible in VCF Automation after manual deletion from vSphere Kubernetes Services.

book

Article ID: 430924

calendar_today

Updated On:

Products

VCF Automation

Issue/Introduction

User has  vSphere Kubernetes Services (VKS) clusters and/or associated namespaces still visible in VCF Automation, despite being manually removed from vSphere Kubernetes Services (VKS).

Environment

VCF Automation 9.0.x

Cause

Manual deletion of vSphere Kubernetes Services (VKS) Cluster and/or Namespaces.

Since these were not deleted from VCF Automation, then the VCF Automation does not run the API calls required to safely and completely remove all references to them in its database.

Resolution

SSH to a VCF Automation appliance node.

 

Set the "kubecontext" for the VCF Automation appliance Kubernetes cluster:

export KUBECONFIG=/etc/kubernetes/admin.conf

Connect to the Primary Postgres Database container:

kubectl -n prelude exec -it vcfapostgres-0 -- bash

Once connected to the "vcfapostgres-0" pod, connect to the Postgres database:

psql -U postgres -d catalog_db

You should see the prompt "catalog_db#"

Query the vSphere Kubernetes Services (VKS) cluster to be deleted, to see that it is still present in the VCF Automation Database:

select name, namespace from dep_supervisor_resource where namespace='<namespace that doesn't exist>' and name='<name of cluster that doesn't exist>';

 

Then connect to the "tenantmanager" database:

\c tenantmanager

And query the "vcf_namespace" table to see if the affected cluster/namespace is also still listed here:

SELECT * FROM vcf_namespace;

 

To resolve this issue, Please open a Support Request with Broadcom Technical Support and note this Article ID (430924) in the problem description and the results of the query above. For more information, see Creating and managing Broadcom support cases.