Uninstall TMC Agents from Supervisor Cluster then Reinstall.
search cancel

Uninstall TMC Agents from Supervisor Cluster then Reinstall.

book

Article ID: 450902

calendar_today

Updated On:

Products

VMware Tanzu Platform - Kubernetes

Issue/Introduction

When switching from an instance of TMC-SM to a new instance of TMC-SM reinstallation of the agents managing the supervisor are required.

Environment

TMC-SM 1.4+
vSphere with VKS 8.0+

Resolution

1. Create uninstall agent CR, e.g uninstall.yaml:

 

Create a yaml file with the below text.

apiVersion: installers.tmc.cloud.vmware.com/v1alpha1
kind: AgentInstall
metadata:
  name: tmc-agent-installer-config
spec:
  operation: UNINSTALL

 

2. Recreate the tmc agent install

Delete agentinstall CRD and create new agentinstall CRD with uninstall.yaml.
Use svc-tmc namespace in place of {{SVC_TMC_NAMESPACE}} this will follow the naming convention svc-tmc-<vCenter domain>. (i.e. "svc-tmc-c1111" or "svc-tmc-c####")

kubectl -n {{SVC_TMC_NAMESPACE}} delete agentinstall tmc-agent-installer-config
kubectl -n {{SVC_TMC_NAMESPACE}} create -f uninstall.yaml

Also reference:
https://techdocs.broadcom.com/us/en/vmware-tanzu/standalone-components/tanzu-mission-control-self-managed/1-4/tmc-self-managed-documentation/using-tmc/managing-the-lifecycle-of-vsphere-based-kubernetes-clusters/deregister-a-management-cluster-from-tmc/manually-remove-the-cluster-agent-from-a-supervisor-running-in-vsphere/manually-remove-the-cluster-agent-from-a-supervisor-running-in-vspher-0.html

3. Recreate the tmc agent install

kubectl -n {{SVC_TMC_NAMESPACE}} delete agentinstall tmc-agent-installer-config
kubectl -n {{SVC_TMC_NAMESPACE}} create -f uninstall.yaml


• Wait for all TMC agents are deleted and job tmc-agent-installer completed, then create the tmc-agent-config

kubectl create -f tmc-agent-config.yaml


4. Reregister the supervisor cluster to TMC:

Follow below linked document to register the supervisor to the new instance of TMC-SM.


https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere-supervisor/7-0/vsphere-with-tanzu-configuration-and-management-7-0/configuring-and-managing-a-supervisor-cluster/registering-tanzu-mission-control-self-managed-with-supervisor.html