As a platform operator, you can work with your Tanzu Kubernetes Grid (TKG) administrator to register a vSphere IaaS control plane (formerly known as vSphere with Tanzu) Supervisor on Tanzu Platform for Kubernetes to enable the life cycle management of 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.
To effectively use Tanzu Platform to manage your Tanzu Kubernetes clusters, make sure that your clusters abide by the following guidelines.
To enable Tanzu Application Engine on the Tanzu Platform for Kubernetes, make sure your clusters abide by the following additional guideline.
To register a Supervisor with Tanzu Platform for Kubernetes:
kubectl
on the Supervisor as described below.As an alternative to using the vSphere Client web interface, you can use the following command-line procedure.
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 IaaS control plane documentation.
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.
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
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
Save and close the file.
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
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 IaaS control plane is registered with Tanzu Platform for Kubernetes. You can return to 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.