This article provides instructions for creating a Tanzu Kubernetes Grid Multi-Cloud (TKGm) workload cluster on vSphere via the Tanzu Mission Control CLI.
1. Login to TMC from the management cluster using 'tmc login' command.
tmc login --name mgmt-40
https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens
? API Token ****************************************************************
? Login context name mgmt-40
? Select default log level info
? Management Cluster Name mgmt-40
? Provisioner Name
√ Successfully created context mgmt-40, to manage your contexts run `tmc system context -h`
2. Check for the available TMC templates. Choose the appropriate template from the template list.
tmc cluster template list
NAME DESCRIPTION
default A simple AWS cluster.
default-iam default template for the iam-policy resource
expert Fully customizable template for the Cluster resource
tkg-vsphere Provision cluster using Tanzu Kubernetes Grid on vSphere 6.7.
tkgs Provision cluster using Tanzu Kubernetes Grid Service on vSphere 7.
attached An attached cluster.
aws-ha A highly available AWS cluster.
3. Provision a TKGm workload cluster on vSphere using tmc cluster create. Here, "-t" is to specify the template and "-i" for interactive mode.
tmc cluster create -it tkg-vsphere
i using template "tkg-vsphere"
? Name tmc-provisioned
? ManagementClusterName <management-cluster-name>
? ProvisionerName default
? Labels env:test
? ClusterGroup <cluster-group-name>
? PodsCidrBlocks 100.##.#.0/11
? ServiceCidrBlocks 100.##.#.0/13
? SSHKey <your ssh public key>
? Version v1.20.5+vmware.2-tkg.1
? Datacenter /Datacenter
? Datastore /Datacenter/datastore/vsanDatastore
? Folder /Datacenter/vm/env40
? ResourcePool /Datacenter/host/Cluster/Resources/RP40
? WorkspaceNetwork /Datacenter/network/Lab-env40
? ControlPlaneCPU 2
? ControlPlaneDiskGib 20
? ControlPlaneMemoryMib 4096
? HighAvailability false
? WorkerNodeCount 1
? WorkerCPU 2
? WorkerDiskGib 20
? WorkerMemoryMib 4096
? NodePoolName default-node-pool
? NodePoolDescription default description for the nodepool
√ cluster "tmc-provisioned" is being created
4.Verify the cluster creation in TMC console.
Note: In case of any failure during validation of parameters in the tmc create command, it will generate a template.yaml under the /tmp directory for troubleshooting.
tmc cluster list | grep tmc-provisioned
tmc-provisioned mgmt-cluster default tmc.cloud.vmware.com/creator:user
tanzu cluster list
NAME NAMESPACE STATUS CONTROLPLANE WORKERS KUBERNETES ROLES PLAN
tmc-provisioned default running 1/1 1/1 v1.20.5+vmware.2 <none> dev