Stale Antrea Cluster in NSX
search cancel

Stale Antrea Cluster in NSX

book

Article ID: 411239

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

A stale Antrea cluster name is visible in NSX Traceflow UI. 

The reported Antrea Cluster no longer exists in the customer environment. 

The following API, however, still references the non-existent Antrea cluster: 

curl -k -u 'admin:ADMIN_PASSWORD' https://NSX_MANAGER_IP/policy/api/v1/infra/sites/default/enforcement-points/default/cluster-control-planes


{
  "results" : [ {
    "node_id" : "####-####-####-####",
    "resource_type" : "ClusterControlPlane",
  "id" : "###",
    "display_name" : "###",
    "path" : "/infra/sites/default/enforcement-points/default/cluster-control-planes/###",
    "relative_path" : "###",
...
}

Environment

VMware NSX

Cause

Stale data can occur when the cluster was registered manually (thus requiring a manual deregistration), and then the K8s cluster was deleted without running the deregistration job. 

Reference Doc

Since vSphere 8.0.3, the product provides an auto-registered + auto-cleanup workflow; this kind of issue won't happen in the automated workflow.

Resolution

The following command can be used to delete that cluster control plane resource.

curl -k -u 'admin:ADMIN_PASSWORD' \
  -X DELETE -H "X-Allow-Overwrite: true" \
https://NSX_MANAGER_IP/policy/api/v1/infra/sites/default/enforcement-points/default/cluster-control-planes/###?cascade=true

Additional Information

The customer may also receive "Control Channel To Antrea Cluster Down Long " alarm raised on the NSX system due to the stale Antrea cluster entry. 

https://knowledge.broadcom.com/external/article?articleNumber=409210