Register a Supervisor in Tanzu Platform

As a platform operator, you can work with your Tanzu Kubernetes Grid (TKG) administrator to register a Supervisor in Tanzu Platform for Kubernetes to enable lifecycle management of its workload clusters.

When you register a Supervisor, you create secure connection to Tanzu Platform for Kubernetes that allows you to bring its workload clusters under management, assign them to cluster groups, and apply policies. You can also manage the entire lifecycle of your workload clusters (including create, update, and delete) from Tanzu Platform for Kubernetes.

Tanzu Kubernetes cluster requirements

To effectively use Tanzu Platform to manage your Tanzu Kubernetes clusters, make sure that your clusters abide by the following guidelines.

  • Environment: Tanzu Kubernetes Grid Service Supervisor running in vSphere with Tanzu (vSphere 8 Update 2c and later).
  • Your Supervisor must be a production cluster with multiple control plane nodes.
  • Your workload clusters require at least 4 vCPUs and 8 GB of RAM per node.

To enable Tanzu Application Engine on the Tanzu Platform for Kubernetes, make sure your clusters abide by the following additional guideline.

  • Your workload cluster requires a minimum of 3 nodes, each with 4 vCPUs, and 16 GB of RAM.

Before you begin

  • Log in to Tanzu Platform hub, and then choose the project in which to register the Supervisor.
  • Make sure you have the appropriate permissions to register a Supervisor.

Register a Supervisor

To register a Supervisor with Tanzu Platform for Kubernetes:

  1. In the Tanzu Platform hub, click to expand Setup & Configuration in the left navigation pane, and then click Kubernetes Management.
  2. Click the TKG Registrations tab, and the click Register TKG Instance.
  3. On the Register page, provide a name for the Supervisor, and select a default cluster group for workload clusters. When you add workload clusters, you can choose the cluster group into which to place them. This setting simply indicates the default choice.
  4. You can optionally provide a description and labels for the Supervisor.
  5. Click Next. When you click Next, Tanzu Platform for Kubernetes generates a YAML file that defines how the Supervisor connects to Tanzu Platform for registration. The credential provided in the YAML expires after 48 hours. You can optionally click View YAML to see the code.
  6. The URL provided on the Register page is used to deploy the cluster agent to the Supervisor, which can be done through the vSphere Client, or using kubectl on the Supervisor as described below.
  7. After the cluster agent is deployed to the Supervisor, you can return to the hub and click TKG Registrations.

Deploy the cluster agent to your Supervisor

vSphere Client
Use the vSphere Client to install the cluster agent.
  1. Log in to your vSphere with Tanzu environment using the vSphere Client.
  2. Select Workload Management from the vSphere Client menu.
  3. Select the Supervisor you want to register with the Tanzu Platform for Kubernetes.
  4. Click the Configure tab.
  5. In the left navigation pane (under TKG Service), click Tanzu Mission Control.
  6. Enter the registration URL.
  7. Click Register.
CLI-based steps
Use kubectl commands to install the cluster agent.

As an alternative to using the vSphere Client web interface, you can use the following command-line procedure.

  1. In a command window, log in to the Supervisor with administrative credentials, as described in Connect to the Supervisor 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 that 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 namespace on the Supervisor. The following kubectl command returns namespaces on the cluster.

    kubectl get ns
    

    The Tanzu 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 tanzu-reg.yaml. Enter the following YAML code in the file:

    apiVersion: installers.tmc.cloud.vmware.com/v1alpha1
    kind: AgentInstall
    metadata:
      name: tanzu-agent-installer-config
      namespace: TANZU-NAMESPACE
    spec:
      operation: INSTALL
      registrationLink: TANZU-REG-URL
    

    Where:

    • TANZU-NAMESPACE is the name of namespace that you retrieved from the cluster.
    • TANZU-REG-URL is the URL provided by Tanzu Platform hub 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: tanzu-agent-installer-config
      namespace: svc-tmc-c8
    spec:
      operation: INSTALL
      registrationLink: https://myorg.tmc.cloud.vmware.com/installer?id=121f2verylongstring23e&source=registration
    
  5. Save and close the file.

  6. In your command window, run a kubectl create command to apply the registration YAML to your Supervisor.

    For example:

    kubectl create -f tanzu-reg.yaml
    

    When you run this command, the Tanzu cluster agent is installed on the Supervisor. The resulting output looks something like this:

    agentinstall.installers.tmc.cloud.vmware.com/tanzu-agent-installer-config created
    
  7. You can optionally run a kubectl describe command like the following to monitor the progress of the installation.

    kubectl -n TANZU-NAMESPACE describe agentinstall tanzu-agent-installer-config
    

    When the status: line at the bottom of the output changes from INSTALLATION_IN_PROGRESS to INSTALLED, the installation is complete.

When the installation is complete, your Supervisor running in vSphere with Tanzu is registered with Tanzu Platform for Kubernetes. You can return to the Tanzu Platform hub and view the registered Supervisor on the TKG Registrations tab of the Kubernetes Management page. It might take a few minutes for Tanzu Platform for Kubernetes to start receiving health information from the Supervisor.

check-circle-line exclamation-circle-line close-line
Scroll to top icon