Use the Tanzu Mission Control CLI to attach a cluster running on a network that is protected by a proxy server.

To attach a cluster that is running behind a proxy server, you can use the Tanzu Mission Control CLI. The tmc cluster attach command in this procedure generates a YAML manifest and runs it on your cluster to attach it to your Tanzu Mission Control organization.

This procedure is only necessary if your cluster is running behind a proxy server. If your cluster is not behind a proxy server, you can attach it as described in Attach a Cluster.

Note: The Tanzu Mission Control CLI has been updated to facilitate the use of a proxy configuration object. As a result, the following flags for this command are deprecated:
  • --http-proxy-url
  • --http-proxy-username
  • --http-proxy-password

Prerequisites

Make sure you have the appropriate permissions.
  • To attach a cluster, you must be associated with the clustergroup.edit role on the cluster group in which you want to attach the cluster.
  • To use a proxy configuration, you must be associated with the organization.credential.view role in your organization.
  • On the cluster, you must have admin permissions to install and run the cluster agent extensions.

Create a proxy configuration object, as described in Connecting Through a Proxy.

Download and install the Tanzu Mission Control CLI, as described in Log In with the Tanzu CLI.

Procedure

  • Run the tmc cluster attach command with the following flags to register the cluster and generate the YAML.
    • --name <cluster name as you want it to appear in the console>
    • --cluster-group <name of the cluster group in which you want to attach the cluster>
    • -k <kubeconfig for the cluster>
    • --proxy <name of the proxy configuration you created for the cluster>
    tmc cluster attach --name myclustername --cluster-group myclustergroup -k mykubeconfig --proxy myproxyconfig
    When you run the command, Tanzu Mission Control registers the cluster with the cluster agent using the cluster name and cluster group that you provided, and then runs the YAML manifest to attach your cluster.