Unmanage a cluster from TMC using TMC API
search cancel

Unmanage a cluster from TMC using TMC API

book

Article ID: 383119

calendar_today

Updated On:

Products

VMware Tanzu Mission Control

Issue/Introduction

Cluster has been created using TMC API and there is a need to detach/unmanage it using TMC API. The cluster should only be unmanaged and not deleted.

Environment

TMC with clusters managed by TMC

Resolution

A HTTP PATCH can be invoked on the cluster object with tmcManaged set to false.

{
   "fullName": {
     "managementClusterName": "string",
     "provisionerName": "string",
     "name": "string"
   },
   "patch": [
     {
       "op": "add",
       "path": "spec.tmcManaged",
       "value": false
     },
     {
       "op": "add",
       "path": "spec.clusterGroupName",
       "value": "re-prod"
     }
   ]
 }

This will remove TMC namespace and its contents from the cluster. It also removes the cluster from the TMC Cluster group.

Additional Information

If any additional TMC objects need to be removed from the cluster, please refer to the Manage Detached Cluster Resources documentation