To register Tanzu Mission Control Self-Managed with Supervisor, create and apply a custom resource definition for the TMC Agent.
About Tanzu Mission Control Self-Managed
For more information about Tanzu Mission Control Self-Managed, including how to install and configure, refer to the documentation Installing and Running VMware Tanzu Mission Control Self-Managed.
Register Tanzu Mission Control Self-Managed with Supervisor
To integrate Tanzu Mission Control Self-Managed with Supervisor, create a custom resource definition with that references the TMC Agent. Supervisor includes a Kubernetes namespace for TMC where the agent is installed.
Complete the following procedure.
- Install Tanzu Mission Control Self-Managed as described in the documentation. See Installing and Running VMware Tanzu Mission Control Self-Managed.
- Using a web browser, access the Tanzu Mission Control Self-Managed local deployment.
- Export the root CA certificate for the Tanzu Mission Control Self-Managed installation.
- If you are using a well-known CA, click the lock icon to the left of the address bar in the browser and view the certificate. If you are using a private CA, click the not secure button and view the certificate.
- On the certificate dialog pop-up, select the
Details
tab and then theExport
button to download a copy of the CA cert. - Open the ca cert file with the text editor of your choice to access the CA cert content
- Using the vSphere Plugin for kubectl, authenticate with Supervisor.
kubectl vsphere login --server=IP-ADDRESS --vsphere-username USERNAME
- Run the following commend to list the available Kubectl contexts.
kubectl config get-contexts
- Switch context to the target vSphere Namespace where the TKG cluster running Tanzu Mission Control Self-Managed is provisioned.
kubectl config use-context
VSPHERE-NAMESPACE
- Run the following command to list the Kubernetes namespaces.
kubectl get ns
- The Kubernetes namespace on Supervisor for TMC is named
svc-tmc-cXXXX
(where XXXX is a number). For example,svc-tmc-c1208
. Verify that this Kubernetes namespace exists and is active. - Use a text editor to create the custom resource definition named
agentconfig.yaml
. This file includes the TMC namespace, the hostname of your TMC Self-Managed deployment, and the CA cert contents.- Enter the name of the Kubernetes Namespace for TMC in the
namespace
field. - Enter the CA certificates in the
caCerts
fields. - Enter the TMC host name in the
allowedHostNames
field.
apiVersion: "installers.tmc.cloud.vmware.com/v1alpha1" kind: "AgentConfig" metadata: name: "tmc-agent-config" namespace: "<namespace>" spec: caCerts: |- -----BEGIN CERTIFICATE----- Certificate1 -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- Certificate2 -----END CERTIFICATE----- allowedHostNames: - "google.com"
- Enter the name of the Kubernetes Namespace for TMC in the
- Apply the
AgentConfig
yaml file that you created.kubectl apply -f agentconfig.yaml
- Complete the registration process using the web interface for your Tanzu Mission Control Self-Managed installation. Refer to the Tanzu Mission Control documentation for instructions.