Tanzu Mission Control – Deploying TKG Clusters to AWS
Tags: kubernetes, vmware, aws, deployment
Published: 2021-04-13 22:25:47

---
title: Tanzu Mission Control – Deploying TKG Clusters to AWS
published: true
date: 2021-04-13 21:56:47 UTC
tags: Kubernetes,VMware,AWS,Deployment
canonical_url: https://veducate.co.uk/tmc-deploy-tkg-aws/?utm_source=rss&utm_medium=rss&utm_campaign=tmc-deploy-tkg-aws
---

This blog post will cover a technical walk-through on using Tanzu Mission Control to deploy Tanzu Kubernetes clusters to AWS.

The follow up blog posts in this series are:

```
Tanzu Mission Control
- [Getting Started with TMC](https://veducate.co.uk/vmware-tanzu-mission-control-getting-started/)
- - What is Tanzu Mission Control?
- - Creating a Cluster Group
- - Attaching a cluster to Tanzu Mission Control
- - Viewing your Cluster Objects
- - Where can I demo/test/trial this myself?
- [Cluster Inspections](https://vEducate.co.uk/vmware-tanzu-mission-control-cluster-inspections)
- - What Inspections are available 
- - Performing Inspections 
- - Viewing Inspections
- [Workspaces and Policies](https://vEducate.co.uk/vmware-tanzu-mission-control-workspaces-and-policies)
- - Creating a workspace 
- - Creating a managed Namespace 
- - Policy Driven Cluster Management 
- - Creating Policies
- [Using the Data Protection feature for backups and restores](https://veducate.co.uk/vmware-tanzu-mission-control-data-protection/)
- - Data Protection Overview 
- - Create a AWS Data Protection Credential 
- - Enable Data Protection on a Cluster 
- - Running a backup manually or via an automatic schedule 
- - Restoring your data
```

###### Using the AWS Hosted Management Cluster

In this example, we will use the default provided AWS Hosted Management cluster.

Alternatively, you can use the Tanzu CLI to provision a TKG Management cluster into AWS and attach this to Tanzu Mission Control.

Currently it is not supported to have a Management Cluster manage clusters across platforms.

- I.e. Management Cluster in AWS that manages workload clusters in Azure.

To get started:

1. Go to Administration
2. Click the Management Clusters Tab
3. Click on the “aws-hosted” cluster object name

[![TMC - Administration - Management Clusters](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Administration-Management-Clusters.jpg?resize=604%2C242&ssl=1)](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Administration-Management-Clusters.jpg?ssl=1)

###### Create a provisioner

The default tab when selecting the “aws-hosted” management cluster object is the provisioner tab.

- Click create provisioner

[![TMC - aws-hosted - provisioners - create provisioner](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-aws-hosted-provisioners-create-provisioner.jpg?resize=604%2C95&ssl=1)](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-aws-hosted-provisioners-create-provisioner.jpg?ssl=1)

- Provide a name for the provisioner
- Click confirm

[![TMC - aws-hosted - provisioners - create provisioner - provide name](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-aws-hosted-provisioners-create-provisioner-provide-name.jpg?resize=545%2C265&ssl=1)](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-aws-hosted-provisioners-create-provisioner-provide-name.jpg?ssl=1)

You will be taken back to your provisioner object which is created. Using the radio button to select the object will allow you to delete it. No other action is available.

[![TMC - aws-hosted - provisioners - provisioner created](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-aws-hosted-provisioners-provisioner-created.jpg?resize=604%2C149&ssl=1)](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-aws-hosted-provisioners-provisioner-created.jpg?ssl=1)

###### Create the AWS account

1. Click on accounts tab
2. Click the “Create Account Credential” Button

[![TMC - aws-hosted - accounts - create account credential](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-aws-hosted-accounts-create-account-credential.jpg?resize=604%2C202&ssl=1)](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-aws-hosted-accounts-create-account-credential.jpg?ssl=1)

- Select the provisioner you created in the last steps
- Provide a credential name
- Click “Generate Template” and download the template file provided.

![TMC - Create AWS cluster lifecycle management provider credential - Credential Name](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Create-AWS-cluster-lifecycle-management-provider-credential-Credential-Name.jpg?resize=604%2C246&ssl=1)

[![TMC - Create AWS cluster lifecycle management provider credential - Credential Name - Generate Template](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Create-AWS-cluster-lifecycle-management-provider-credential-Credential-Name-Generate-Template.jpg?resize=374%2C310&ssl=1)](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Create-AWS-cluster-lifecycle-management-provider-credential-Credential-Name-Generate-Template.jpg?ssl=1)

- Create your AWS ARN in the AWS console using CloudFormation, you can follow the [documentation here for these steps.](https://docs.vmware.com/en/VMware-Tanzu-Mission-Control/services/tanzumc-using/GUID-E728F568-5F1F-4963-A887-F09E2D19EA34.html)

[![TMC - Create AWS cluster lifecycle management provider credential - AWS configuration](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Create-AWS-cluster-lifecycle-management-provider-credential-AWS-configuration.jpg?resize=604%2C145&ssl=1)](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Create-AWS-cluster-lifecycle-management-provider-credential-AWS-configuration.jpg?ssl=1)

- Provide the ARN output from the CloudFormation Stack and click “Create Credential”

[![TMC - Create AWS cluster lifecycle management provider credential - AWS role ARN](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Create-AWS-cluster-lifecycle-management-provider-credential-AWS-role-ARN-.jpg?resize=604%2C285&ssl=1)](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Create-AWS-cluster-lifecycle-management-provider-credential-AWS-role-ARN-.jpg?ssl=1)

After a few minutes your account should have a green tick next to it when TMC has validated access to AWS using the ARN role details provided for the account.

[![TMC - aws-hosted - account created](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-aws-hosted-account-created.jpg?resize=604%2C145&ssl=1)](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-aws-hosted-account-created.jpg?ssl=1)

###### Create a Tanzu Kubernetes Grid Cluster

1. Go to Clusters Tab in the left-hand navigation window
2. Click Create Cluster

[![TMC - Clusters - Create Cluster](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster.jpg?resize=604%2C203&ssl=1)](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster.jpg?ssl=1)

- Select your management cluster where you want to provision the new workload cluster
- Click “Continue to create cluster”

[![TMC - Clusters - Create Cluster - Select Management Cluster](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster-Select-Management-Cluster.jpg?resize=604%2C131&ssl=1)](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster-Select-Management-Cluster.jpg?ssl=1)

- Select your Provisioner
- Select your AWS Account Credentials
- Select your Cluster Group ([if you’ve already created one](https://veducate.co.uk/vmware-tanzu-mission-control-getting-started/))
- Add a description (Optional)
- Add labels (Optional)
- Click Next

[![TMC - Clusters - Create Cluster - Name and Assign](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster-Name-and-Assign.jpg?resize=604%2C497&ssl=1)](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster-Name-and-Assign.jpg?ssl=1)

- Select Region
- Select your SSH Key Pair (You [create these](https://docs.aws.amazon.com/ground-station/latest/ug/create-ec2-ssh-key-pair.html) in your AWS EC2 Console)
- Select the version of Kubernetes you want to deploy
- Select to create a new or existing VPC
  - Set the VPC CIDR if new is selected
- Set your Pod CIDR and Service CIDR
- Click Next

[![TMC - Clusters - Create Cluster - Configure](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster-Configure.jpg?resize=604%2C514&ssl=1)](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster-Configure.jpg?ssl=1)

- Select your node deployment type
  - Singe node – as it says on the tin
  - Highly available – a three node deployment
- Select your availability zones to be used
- Select Next

[![TMC - Clusters - Create Cluster - Select Control Plane](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster-Select-Control-Plane.jpg?resize=604%2C426&ssl=1)](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster-Select-Control-Plane.jpg?ssl=1)

Node pools are a construct grouping worker node configurations.

- Set a name for your node pool
- Set a description (Optional)
- Set Worker instance size
- Set Number of worker nodes
- Set availability zone to be used
- Set Node Labels (Optional)
- Set Cluster Labels (Optional)

Add another node pool as needed, in my example my second node pool uses a different availability zone.

Click Create Cluster.

[![TMC - Clusters - Create Cluster - Edit and add node pools](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster-Edit-and-add-node-pools.jpg?resize=604%2C213&ssl=1)](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster-Edit-and-add-node-pools.jpg?ssl=1)

You will be taken to the Cluster Object UI page for the new cluster, but as it’s not created yet, you’ll get a warning/error message.

[![TMC - Clusters - Create Cluster - Cluster Creating](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster-Cluster-Creating.jpg?resize=604%2C241&ssl=1)](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster-Cluster-Creating.jpg?ssl=1)

Wait 60 seconds or so and refresh your browser and you’ll get an updated status message for the cluster that is being created.

[![TMC - Clusters - Create Cluster - Your cluster is being created](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster-Your-cluster-is-being-created.jpg?resize=604%2C238&ssl=1)](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster-Your-cluster-is-being-created.jpg?ssl=1)

If you click Clusters in the left-hand navigation pane, you will see your cluster in the list with the creating status.

[![TMC - Clusters - Cluster Creating](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Cluster-Creating.jpg?resize=604%2C202&ssl=1)](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Cluster-Creating.jpg?ssl=1)

Finally, you will see the cluster status change to “Ready”. Below is a screenshot of one of my provisioned clusters.

[![TMC - Clusters - Create Cluster - Cluster Ready](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster-Cluster-Ready.jpg?resize=604%2C416&ssl=1)](https://i0.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Clusters-Create-Cluster-Cluster-Ready.jpg?ssl=1)

###### Getting access to your cluster through the TMC UI

On your Cluster page, under actions, select “Access this cluster”

[![TMC - Access your cluster - through the UI](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Access-your-cluster-through-the-UI.jpg?resize=604%2C128&ssl=1)](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Access-your-cluster-through-the-UI.jpg?ssl=1)

- You can download the kubeconfig file to be used
- View the YAML file in your web browser
- See an example Kubectl command line use the kubeconfig file provided

[![TMC - Access your cluster - download kubeconfig](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Access-your-cluster-download-kubeconfig.jpg?resize=546%2C739&ssl=1)](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Access-your-cluster-download-kubeconfig.jpg?ssl=1)

###### Getting access to your cluster through the TMC CLI

You will need the TMC command line installed and logged in using a CSP API Token.

- Install the Tanzu Mission Control CLI (TMC).
  1. In the left navigation pane of the Tanzu Mission Control console, click Automation center.
  2. On the Automation Center page, click Download CLI, and then choose the environment where you want to use the CLI.

- Retrieve an API token:
  1. On the Download CLI page, click the link to go to the My Account page in the VMware Cloud Services console.
    - [http://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens](http://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens)
  2. Click the API Tokens tab.
  3. Click Generate Token to create an API token with a scope of All Roles, and then copy the generated token.

```
tmc login

# Provide the API Token
# Provide the Organisation name
# Provide the management cluster name (default: aws-hosted)
# Provide the Provisioner Nam
```

![Access your cluster - tmc login](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/04/Access-your-cluster-tmc-login.jpg?resize=604%2C98&ssl=1)

The run the following commands:

```
# Get the details of your clusters managed by TMC

tmc cluster list
```

[![Access your cluster - tmc cluster list](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/04/Access-your-cluster-tmc-cluster-list.jpg?resize=604%2C105&ssl=1)](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/04/Access-your-cluster-tmc-cluster-list.jpg?ssl=1)

```
# Retrieve the kubeconfig file for your cluster. The below uses the argument to retrieve the admin configuration. 

tmc cluster auth admin-kubeconfig get {cluster name} -m {management cluster name} -p {provisioner name}
```

[![TMC - Access your cluster - tmc auth admin-kubeconfig get](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Access-your-cluster-tmc-auth-admin-kubeconfig-get-.jpg?resize=604%2C323&ssl=1)](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/04/TMC-Access-your-cluster-tmc-auth-admin-kubeconfig-get-.jpg?ssl=1)

```
# Example below which sends the output to a file

tmc cluster auth admin-kubeconfig get veducate-tkg-aws -m aws-hosted -p veducate-cluster-provisioner > veducate-tkg-aws
```

Finally run commands against your cluster using the config file.

```
kubectl {cmd arguments} --kubeconfig={output file location}
```

![Access your cluster - tmc auth admin-kubeconfig get](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/04/Access-your-cluster-tmc-auth-admin-kubeconfig-get-.jpg?resize=604%2C56&ssl=1)

**Wrap-up and Resources**

In this walk-through we used Tanzu Mission Control to deploy a Tanzu Kubernetes Grid cluster to AWS, using the in-built hosted management cluster provided out of the box. All the steps provided in this blog post can be replicated using the TMC CLI as well.

As a reminder, to take real advantage of TMC I recommend you read the follow posts;

```
Tanzu Mission Control 

- [Getting Started Tanzu Mission Control](https://vEducate.co.uk/vmware-tanzu-mission-control-getting-started) 
- [Cluster Inspections](https://vEducate.co.uk/vmware-tanzu-mission-control-cluster-inspections) 
- [Workspaces and Policies](https://veducate.co.uk/vmware-tanzu-mission-control-workspaces-and-policies/)
- [Data Protection](https://veducate.co.uk/?p=3429&preview=true)
```

You can get hands on experience of Tanzu Mission Control yourself over on the VMware Hands-on-Lab website, which is always free!

[HOL-2032-01-CNA – VMware Tanzu Mission Control](https://labs.hol.vmware.com/HOL/catalogs/lab/6965)

- In this lab you will be exposed to various aspects of VMware’s Tanzu Mission Control including Kubernetes cluster lifecycle management, health checks, environment at-a-glance monitoring, access policies, and conformance testing.

And I’ll sign off with links to the official resources.

- Tanzu Mission Control
  - [Product Page](https://tanzu.vmware.com/mission-control)
  - [Product Documentation](https://docs.vmware.com/en/VMware-Tanzu-Mission-Control/index.html)

Regards

[Follow @Saintdle](https://twitter.com/saintdle)<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

[Dean Lewis](https://uk.linkedin.com/in/saintdle?trk=profile-badge)

The post [Tanzu Mission Control – Deploying TKG Clusters to AWS](https://veducate.co.uk/tmc-deploy-tkg-aws/) appeared first on [vEducate.co.uk](https://veducate.co.uk).