VKS Namespace Stuck in Terminating Status Indefinitely
search cancel

VKS Namespace Stuck in Terminating Status Indefinitely

book

Article ID: 453618

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service

Issue/Introduction

When attempting to delete a VKS Namespace using the command kubectl delete namespace <namespace-name> the namespace deletion task does not complete successfully, and the namespace remains stuck in "Terminating" status indefinitely.  

  • Describing the namespace using command kubectl describe ns <namespace-name> reports the status of the namespace as "Terminating" and does not report any error messages under the Conditions field in the command output

  • All clusters have been successfully deleted before attempting to delete the namespace, and there are no objects returned in the output of command kubectl get all -n <namespace-name> 

Environment

vSphere Kubernetes Service (VKS) 

Resolution

This issue may be resolved by restarting the Workload Control Plane (WCP) Service on vCenter. The service can be restarted by either connecting via SSH to the vCenter Server Appliance, or accessing the vCenter Server Appliance Management Interface (VAMI) page. 


Steps to Restart the Workload Control Plane (WCP) Service using SSH: 

  1. Connect via SSH to the vCenter Server Appliance using root credentials.

  2. Execute the command vmon-cli --restart wcp
  3. Once the restart of the WCP service has completed verify the namespace is no longer stuck in Terminating status and has been deleted successfully by connecting to the Supervisor cluster context and executing the command kubectl describe ns <namespace-name> 



Steps to Restart the Workload Control Plane (WCP) Service Using the vCenter Server Appliance Management Interface (VAMI):

  1. Open your web browser and go to your vCenter Server Appliance Management Interface (VAMI) at https://<your-vcenter-fqdn-or-ip>:5480.

  2. Log in using root credentials.

  3. Click on Services in the left-hand navigation menu.

  4. Scroll down or search to find the Workload Control Plane service

  5. Select the service and click Restart.

  6. Once the restart of the WCP service has completed verify the namespace is no longer stuck in "Terminating" status and has been successfully deleted by connecting to the Supervisor cluster context and executing the command kubectl describe ns <namespace-name>