As a vSphere administrator, you can register a Tanzu Kubernetes Grid Service Supervisor Cluster running in vSphere with Tanzu with Tanzu Mission Control.

When you install vSphere 7.0.1 U1 and enable workload management, or upgrade to vSphere U1 and Update the Supervisor Cluster by Performing a vSphere Namespaces Update for an existing Supervisor Cluster, the Tanzu Mission Control namespace is created and populated with the cluster agent installer. To register the Supervisor Cluster, you run the cluster agent registration script on the Supervisor Cluster.

Prerequisites

This procedure assumes that you have already started the registration process in Tanzu Mission Control as described in Register a Management Cluster with Tanzu Mission Control, and that you have a Tanzu Kubernetes Grid Service Supervisor Cluster running in vSphere with Tanzu.

To register a Supervisor Cluster with Tanzu Mission Control, you must update the vSphere with Tanzu environment to U1, as described in Updating the vSphere with Tanzu Environment. Make sure you adhere to the supported update path, as described in Verify Tanzu Kubernetes Cluster Compatibility for Update.

To use a proxy configuration object when registering a Supervisor Cluster with Tanzu Mission Control, the cluster must be running on vSphere 7.0.3a or later.

Procedure

  1. In a command window, log in to the Supervisor Cluster with administrative credentials, as described in Connect to the Supervisor Cluster as a vCenter Single Sign-On User in the vSphere with Tanzu Configuration and Management documentation.
  2. Make sure your current context is set appropriately for the Supervisor Cluster you want to register.
    You might need to run a kubectl config use-context command to explicitly set the context, for example:
    kubectl config use-context CONTEXT-NAME-IP
    Use the context that is listed as an IP address.
  3. Locate the Tanzu Mission Control namespace on the Supervisor Cluster.
    The following kubectl command returns namespaces on the cluster.
    kubectl get ns
    The Tanzu Mission Control namespace begins with svc-tmc-, for example:
    svc-tmc-c8                                  Active   14m
  4. Create a YAML file to contain the AgentInstall resource information, for example tmc-registration.yaml.
    The contents of this file differs depending on whether or not you are using a proxy configuration.
  5. If you are using a proxy configuration to register the Supervisor Cluster, perform the following tasks to prepare the file.
    1. In the Tanzu Mission Control console, on the last page of the registration workflow, click the View YAML button.
    2. Copy the contents of code box, and paste it into your YAML file.
      The YAML looks something like this.
      apiVersion: installers.tmc.cloud.vmware.com/v1alpha1
      kind: AgentInstall
      metadata:
        name: tmc-agent-installer-config
        namespace: TMC-NAMESPACE
        annotations:
          tmc.cloud.vmware.com/bootstrap-token: "dkFhZ3VudC5XNFFucVQtaFQ0dlongalphanumerictokenstringZScUxIX0kn"
      spec:
        operation: INSTALL
        registrationLink: "https://myorg.tmc.cloud.vmware.com/agent/v1alpha1/managementclusters:manifest/mc:02FPXlongalphanumericstringWEAG04"
      ---
    3. Replace TMC-NAMESPACE with the name of namespace that you retrieved from the cluster.
    4. Save and close the file.
  6. If you are not using a proxy configuration with the registration, perform the following tasks to prepare the file.
    1. Enter the following YAML code in the file.
      apiVersion: installers.tmc.cloud.vmware.com/v1alpha1
      kind: AgentInstall
      metadata:
        name: tmc-agent-installer-config
        namespace: TMC-NAMESPACE
      spec:
        operation: INSTALL
        registrationLink: TMC-REGISTRATION-URL
      
    2. Replace TMC-NAMESPACE with the name of namespace that you retrieved from the cluster.
    3. Replace TMC-REGISTRATION-URL with the URL provided by Tanzu Mission Control when you started the registration process.
      The resulting YAML file should look something like this:
      apiVersion: installers.tmc.cloud.vmware.com/v1alpha1
      kind: AgentInstall
      metadata:
        name: tmc-agent-installer-config
        namespace: svc-tmc-c8
      spec:
        operation: INSTALL
        registrationLink: https://myorg.tmc.cloud.vmware.com/installer?id=121f2verylongstring23e&source=registration
      
    4. Save and close the file.
  7. In your command window, run a kubectl create command to apply the registration YAML to your Supervisor Cluster.
    For example:
    kubectl create -f tmc-registration.yaml
    When you run this command the Tanzu Mission Control cluster agent is installed on the Supervisor Cluster. The resulting output looks something like this:
    agentinstall.installers.tmc.cloud.vmware.com/tmc-agent-installer-config created
  8. You can optionally run a kubectl describe command like the following to monitor the progress of the installation.
    kubectl -n TMC-NAMESPACE describe agentinstall tmc-agent-installer-config
    When the status: line at the bottom of the output changes from INSTALLATION_IN_PROGRESS to INSTALLED, the installation is complete.

Results

When the installation is complete, your Supervisor Cluster running in vSphere with Tanzu is registered with Tanzu Mission Control. You can return to the Tanzu Mission Control console and view the registered Supervisor Cluster on the Management clusters tab of the Administration page. It might take a few minutes for Tanzu Mission Control to start receiving health information from the Supervisor Cluster.