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.
Procedure
- 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.
- 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.
- 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
- 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.
- If you are using a proxy configuration to register the Supervisor Cluster, perform the following tasks to prepare the file.
- In the Tanzu Mission Control console, on the last page of the registration workflow, click the View YAML button.
- 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"
---
- Replace TMC-NAMESPACE with the name of namespace that you retrieved from the cluster.
- Save and close the file.
- If you are not using a proxy configuration with the registration, perform the following tasks to prepare the file.
- 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
- Replace TMC-NAMESPACE with the name of namespace that you retrieved from the cluster.
- 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
- Save and close the file.
- 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
- 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.