This script leverages azurerm terraform provider to provision an AKS Cluster, TMC terraform provider to attach the cluster to Tanzu Mission Control and http provider to onboard the cluster to Tanzu Service Mesh via the TSM API.
- Creates a resource group in Azure.
- Update user assigned identity.
- Creates an AKS Cluster
- Generates a Kubeconfig YAML
- Attaches the AKS cluster to Tanzu Mission Control
- Onboards cluster to TSM via the TSM API
- Azure Account Access Start Free
- Azure Cli Install Azure Cli
- Terraform Cli Install Terraform
- Access to VMWare Cloud Services (with access to Tanzu Mission Control and Tanzu Service Mesh tenant) Login
- Generate Token via VMWare Cloud Services with service role access to Tanzu Mission Control and Tanzu Service Mesh.
- Login to VMWare Cloud Services.
- On the top right click user/organization name.
- Click on My Account.
- Navigate to API Tokens.
- Generate token with service role access to Tanzu Mission Control and Tanzu Service Mesh.
cd iac/azure
Step 2: Update variables.tf with tmc_host, tsm_host & cluster_name (This will be unique for each organization/tenant)
variable "tmc_host" {
type = string
description = "TMC Host"
default = "${YOUR_ORG}.tmc.cloud.vmware.com"
}
variable "tsm_host" {
type = string
default = "${ENV}.nsxservicemesh.vmware.com"
description = "Host for TSM Cloud"
}
variable "cluster_name" {
type = string
description = "AKS Cluster Name"
default = "${YOUR_CLUSTER_NAME}"
}
./config.sh
terraform init -upgrade
terraform plan -var vmw_api_token="${CSP_TOKEN}"
terraform apply -var vmw_api_token="${CSP_TOKEN}" --auto-approve
terraform destroy -var vmw_api_token="${CSP_TOKEN}" --auto-approve