Today a short article on attaching Kubernetes clusters to Tanzu Mission Control (TMC). For people that get started with TMC there’s sometimes some confusion on how to add Kubernetes clusters to TMC. The procedure for attaching a K8S management cluster is slightly different when compared to attaching K8S workload cluster.
Let’s have a closer look at the different procedures.
Attaching a management cluster
Prerequisite: First, make sure you have created a cluster group in TMC before trying to add a workload cluster.
Then select Administration -> Management Cluster and choose the Register Management Cluster option. Now provide a name, cluster group and the required labels:
In step 3 TMC will present you a registration URL that you need to include in a YAML registration file. This YAML should be applied in the context of your management cluster. Follow one of the following procedures depending on your setup:
- For vSphere with Tanzu follow this procedure to complete the registration.
- For TMGm follow this procedure to complete the registration.
After applying the YAML file it will take a few minutes before the management cluster is registered in Tanzu Mission Control and all green checkboxes will show up.
Attaching a workload cluster
Prerequisite: Again, make sure you have created a cluster group before trying to add a workload cluster.
There are two ways to attach a workload cluster:
- Through a management cluster that is already registered in TMC;
- Manually through the Attach Cluster wizard.
The first option is most straight forward. Open the management in TMC, select your workload cluster and choose manage.
After a couple of minutes the cluster reports available in TMC:
Another option is to add the cluster through the Attach Cluster option, this option is available in a Cluster Group. Open a Cluster Group and choose Actions->Attach Cluster. Give the cluster a name and select the Cluster Group. In step you will get a registration command similar to:
Execute this command in the context of your Workload Cluster and it will automatically be added to TMC.
That’s it! Feel free to leave a comment below.