The service namespace svc-tkg-domain-#### already exists.” error encountered while installing supervisor services on a backup restored Supervisor cluster
search cancel

The service namespace svc-tkg-domain-#### already exists.” error encountered while installing supervisor services on a backup restored Supervisor cluster

book

Article ID: 414796

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service

Issue/Introduction

  • After restoring the Supervisor cluster from a backup, the Supervisor services fails to install and encounters the following error in the GUI:

Configured Core Supervisor Services
Service: velero.vsphere.vmware.com. A general system error occurred. Error message: error installing service 'velero.vsphere.vmware.com' version '1.8.0-embedded+24668882' on cluster 'domain-c####': Failed to create Supervisor Service (velero.vsphere.vmware.com) version (1.8.0-embedded+24668882) on cluster (domain-c####). The service namespace (svc-velero-domain-c####) already exists..

Service: tkg.vsphere.vmware.com. A general system error occurred. Error message: error installing service 'tkg.vsphere.vmware.com' version '3.3.3-embedded' on cluster 'domain-c####': Failed to create Supervisor Service (tkg.vsphere.vmware.com) version (3.3.3-embedded) on cluster (domain-c####). The service namespace (svc-tkg-domain-c####) already exists..

  • Logs of the wcp service on the vCenter confirm the problem:

/var/log/vmware/wcp/wcpsvc.log

YYYY-MM-DDTHH:MM:SS.329Z error wcp [appplatform/kube_supervisor_service_version_carvel.go:178] [opID=68e7####] Failed to create k8s namespace svc-tkg-domain-c#### for service (tkg.vsphere.vmware.com): <nil>
YYYY-MM-DDTHH:MM:SS.329Z error wcp [appplatform/clustersupervisorservices.go:145] [opID=68e7####] failed to create supervisor service tkg.vsphere.vmware.com version 3.3.3-embedded on cluster domain-c####: Failed to create Supervisor Service (tkg.vsphere.vmware.com) version (3.3.3-embedded) on cluster (domain-c####). The service namespace (svc-tkg-domain-c####) already exists.
YYYY-MM-DDTHH:MM:SS.330Z debug wcp [event/event.go:150] [opID=68e7####] publish event for with err message {"Id":"vcenter.wcp.appplatform.clustersupervisorservice.create.ns_already_exist_error","DefaultMessage":"Failed to create Supervisor Service (tkg.vsphere.vmware.com) version (3.3.3-embedded) on cluster (domain-c####). The service namespace (svc-tkg-domain-c####) already exists.","Args":["tkg.vsphere.vmware.com","3.3.3-embedded","domain-c####","svc-tkg-domain-c####"],"Params":null,"Localized":"Failed to create Supervisor Service (tkg.vsphere.vmware.com) version (3.3.3-embedded) on cluster (domain-c####). The service namespace (svc-tkg-domain-c####) already exists."}

Environment

VMware vCenter 8.0 U3

Cause

When restoring the Supervisor cluster, the existing namespaces for the Supervisor services are not restored.

Resolution

The issue will be fixed in the future vCenter releases.

Workaround:

  1. SSH into the vCenter Server Appliance (VCSA).

  2. Locate the core services configuration file:

    • /etc/vmware/wcp/supervisorservices/core-services.json

  3. Back up the file (required):

    cp /etc/vmware/wcp/supervisorservices/core-services.json \
       /etc/vmware/wcp/supervisorservices/core-services-ori.json
    
  4. Temporarily clear the core services list:

    • Edit /etc/vmware/wcp/supervisorservices/core-services.json

    • Replace the entire content with:

      {}
      
  5. Wait 3-5 minutes for the system to register the change.

  6. Delete the affected namespaces (as shown in the UI error) using DCLI:

    dcli +i
    

    Then run:

    namespaces instances delete --namespace <namespace_name_from_UI_error>
    
  7. Restore the original core services configuration:

    cp /etc/vmware/wcp/supervisorservices/core-services-ori.json \
       /etc/vmware/wcp/supervisorservices/core-services.json
    
  8. Wait for services to reinstall and return to a healthy state.