Unable to delete Edges due to gateways dependencies in TKG environment.
search cancel

Unable to delete Edges due to gateways dependencies in TKG environment.

book

Article ID: 420522

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • After decommissioning TKG, attempts to delete the associated K8s Edges, Tier-1 Gateways, or Tier-0 Gateways in NSX-T are failing.
    The  NSX UI throws an error/s indicating that the object cannot be deleted because it is still referenced by other components.

  • Errors seen during Edge deletion:
    • “Deletion failed due to dependent objects.”
    • Tier-0 or Tier-1 Gateways cannot be removed because they are referenced by other components.
    • Edges cannot be removed from the Edge Cluster or deleted directly from Fabric Nodes.
    • Attempts to redeploy new Edges fail because old Tanzu-related components remain in NSX-T.

Environment

VMware NSX-T Data Center
VMware NSX

Cause

NSX-T does not allow deletion of an object while other NSX components still reference it. Residual Tanzu-related items such as External Connections, Tier-0/Tier-1 Gateways, Segments, or Edge Cluster bindings may remain in the environment, preventing deletion.

Resolution

Follow the steps below to remove the dependent objects in the right order and then proceed to delete the Edge nodes:

  1. Remove External Connections

    • Navigate to Networking > External Connections.

    • Locate the External Connection that references the Tier-0 Gateway associated with the Edge Cluster.

    • Click the three dots (options menu) and select Delete.

    • Note: If deletion fails because a Transit Gateway is using this External Connection, update the Transit Gateway configuration to stop referencing it, then attempt the deletion again.

  2. Delete the Tier-0 Gateway

    • Go to Networking > Tier-0 Gateways.

    • Identify the Tier-0 Gateway linked to the Edge Cluster.

    • Open the options menu and select Delete.

    • Note: This action may fail if Tier-1 Gateways, Segments, or other dependent objects still reference the Tier-0. Remove those dependencies before retrying deletion.

  3. Delete Tier-1 Gateways and Segments (if present)

    • Remove any Tier-1 Gateways attached to the Tier-0.

    • Delete associated Segments, including any Tanzu or K8s-related logical networks.

  4. Remove Edges from the Edge Cluster

    • Navigate to System > Fabric > Nodes > Edge Clusters.

    • Select the relevant Edge Cluster.

    • Detach the Edge nodes from the cluster.

  5. Delete the Edge Nodes

    • Navigate to System > Fabric > Nodes.

    • Select the Edge nodes and click Delete.

    • If deletion results in a “Delete Failed” message, use the Cleanup Stale Edge Nodes procedure documented in the associated KB to complete the removal.

Additional Information

Remove NSX Edge Nodes from an Edge Cluster
Removing an Edge from NSX fails after the Edge VM has been deleted from the vSphere inventory