The 'tmc' cli has been deprecated. The 'tanzu' cli with the 'mission-control' plugin should be used instead. In the deprecated 'tmc' cli, while attaching a cluster using the 'tmc cluster attach' command, the flags '--cluster-group' and '--labels' can be used to set the cluster group and any custom labels. In the new 'tanzu' cli, these specific flags are not available.
Tanzu Mission Control
To set the cluster group and any custom labels while attaching using the 'tanzu' cli, follow these steps:
fullName:
managementClusterName: attached
name: testcluster
provisionerName: attached
meta:
labels:
cluster-name: testcluster-label
spec:
clusterGroupName: testclustergroup
type:
kind: Cluster
package: vmware.tanzu.manage.v1alpha1.cluster
version: v1alpha1
$ tanzu mission-control cluster attach -n testcluster -k ~/.kube/config -f /tmp/tmccluster-manifest.yaml