Registering TKG Management Cluster on TMC

Source -> VMware Doc

What is TKG Management Cluster?

Tanzu Kubernetes Grid (TKG) Management cluster a Kubernetes cluster that hosts Cluster API to provision and manage lifecycle of TKG workload clusters.

Want to read more about TKG?

https://docs.vmware.com/en/VMware-Tanzu-Kubernetes-Grid/index.html

What is TMC?

Tanzu Mission Control (TMC) is a SaaS solution from VMware to manage TKG and non TKG Kubernetes conformance clusters. Management includes some of the functions like policy, conformance, backup and recovery, audit etc.

Want to read more about TMC?

https://docs.vmware.com/en/VMware-Tanzu-Mission-Control/index.html

Why we should register TKG Management Cluster on TMC?

Generally, TKG workload clusters are registered on TMC to manage policy, conformance etc. and those are not supported (as of now) for TKG management cluster. But, One of the function of TMC is to provision TKG workload clusters too and it needs TKG management cluster. So, for workload cluster provisioning use case, this is needed.

Registration Pre-requirements

Resource Requirements

a) Tanzu Kubernetes Grid workload clusters need at least 4 CPUs and 8 GB of memory. 
 b) One Cluster group is created on TMC

Supported TKG Management Clusters for TMC registration

a) Tanzu Kubernetes Grid Service Supervisor Clusters running in vSphere with Tanzu. 
b) Tanzu Kubernetes Grid management clusters (version 1.3 or later) running in vSphere on Azure VMware Solution (AVS). 
c) Tanzu Kubernetes Grid management clusters (version 1.2 or later) running in vSphere, including vSphere on VMware Cloud on AWS (version 1.12 or 1.14).

Access Permissions

a) You must have admin privileges on the management cluster.
 b) In Tanzu Mission Control, you must be associated with the managementcluster.admin role.

Steps to register TKG Management Cluster on TMC

You can follow the below steps to register TKG Management cluster on TMC.

Note: Registration process for TKG Workload cluster is bit different than Management cluster.

  1. Login to TMC UI, You can go to https://console.cloud.vmware.com/ url and click on TMC tile to login.
  2. You will see different options as shown in below screenshot, Click on the Administration

3. You will see different options again, Click on Management Clusters tab

4. Now, Click on Register Management Cluster button and select Tanzu Kubernetes Grid option

5. It will open up form, Fill out the details and click on Next button

6. It will show the Registration URL, apply to TKG management cluster using kubectl command

$ k apply -f "<your registration url>"
namespace/vmware-system-tmc unchanged
configmap/stack-config configured
secret/tmc-access-secret configured
customresourcedefinition.apiextensions.k8s.io/agents.clusters.tmc.cloud.vmware.com configured
customresourcedefinition.apiextensions.k8s.io/extensionconfigs.intents.tmc.cloud.vmware.com configured
customresourcedefinition.apiextensions.k8s.io/extensionintegrations.clusters.tmc.cloud.vmware.com configured
customresourcedefinition.apiextensions.k8s.io/extensionresourceowners.clusters.tmc.cloud.vmware.com configured
customresourcedefinition.apiextensions.k8s.io/extensions.clusters.tmc.cloud.vmware.com configured
serviceaccount/extension-manager configured
clusterrole.rbac.authorization.k8s.io/extension-manager-role configured
clusterrolebinding.rbac.authorization.k8s.io/extension-manager-rolebinding configured
service/extension-manager-service configured
deployment.apps/extension-manager configured
serviceaccount/extension-updater-serviceaccount configured
podsecuritypolicy.policy/vmware-system-tmc-agent-restricted configured
clusterrole.rbac.authorization.k8s.io/extension-updater-clusterrole configured
clusterrole.rbac.authorization.k8s.io/vmware-system-tmc-psp-agent-restricted configured
clusterrolebinding.rbac.authorization.k8s.io/extension-updater-clusterrolebinding configured
clusterrolebinding.rbac.authorization.k8s.io/vmware-system-tmc-psp-agent-restricted configured
deployment.apps/extension-updater configured
serviceaccount/agent-updater configured
clusterrole.rbac.authorization.k8s.io/agent-updater-role configured
clusterrolebinding.rbac.authorization.k8s.io/agent-updater-rolebinding configured
deployment.apps/agent-updater configured
cronjob.batch/agentupdater-workload configured

7. It will take few mins to install TMC agents on TKG Management cluster, You can view the status on TKG cluster and also verify the connection on TMC UI. 
Once it is successfully registered, Clicking on Verify connection button will take you the summary page. e.g. below

8. on TKG cluster, you will see vmware-system-tmc namespace created and TMC agents running. Here are the running pods.

$ k get po -n vmware-system-tmc
NAME READY STATUS RESTARTS AGE
pod/agent-updater-6574b86499-jlhpk 1/1 Running 0 78m
pod/agentupdater-workload-1630605240-bq7h4 0/1 Completed 0 39s
pod/cluster-health-extension-59f594f47c-rnzw4 1/1 Running 0 77m
pod/extension-manager-6d476c4b96-62lbx 1/1 Running 0 78m
pod/extension-updater-8479b44d5c-45fn9 1/1 Running 0 78m
pod/intent-agent-7f64d95c5c-m64px 1/1 Running 0 77m
pod/lcm-tkg-extension-7546dd4f89-f48l8 1/1 Running 0 77m
pod/lcm-tkg-operator-7679b7dc5-wpt6s 1/1 Running 0 77m
pod/resource-retriever-fb5c99cc6-6j9s4 1/1 Running 0 77m
pod/sync-agent-5fb95d7886-j2qvs 1/1 Running 0 77m
pod/tmc-auto-attach-7b477dc9cd-nfcjr 1/1 Running 0 77m

This completes the registration process. You can go ahead and deploy TKG workload clusters now.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s