Performs management cluster operations.
NoteThe
tanzu management-cluster
command group creates and manages only standalone management clusters. You cannot use this command group to create and manage TKG 2 Supervisor clusters.Important Version 0.32.0 of the
tanzu management-cluster
command group for Tanzu Kubernetes Grid v2.5 does not support the creation of TKG management clusters on AWS and Azure. Use the Tanzu Mission Control interface or the Tanzu Mission Control CLI commands ekscluster and aks-cluster to create native AWS EKS and Azure AKS clusters on AWS and Azure.For more information, see End of Support for TKG Management and Workload Clusters on AWS and Azure in the VMware Tanzu Kubernetes Grid v2.5 Release Notes.
CLI plugin: management-cluster
| Target: kubernetes
| Primarily used for: Platform operations | Release Notes
Syntax:
tanzu management-cluster [COMMAND]
management-cluster
, mc
, and management-clusters
-h, --help
Help text.
--log-file
Path to the log file.
-v, --verbose
Log verbosity, from 0
to 9
.
(vSphere only) Manages availability zones for class-based clusters.
Available commands:
Deletes the specified availability zone from the management cluster.
tanzu management-cluster available-zone delete AZ-NAME [FLAGS]
To delete example-az
:
tanzu management-cluster available-zone delete example-az
-h, --help
Help text.
-y, --yes
When --yes
is specified, the command skips the confirmation step.
Lists availability zones.
tanzu management-cluster available-zone list [FLAGS]
To list all availability zones defined in the management cluster:
tanzu management-cluster available-zone list -a
-a, --all
Lists all availability zones.
-c, --cluster
Lists availability zones used by the specified workload cluster.
-h, --help
Help text.
Defines availability zones for the management cluster and its workload clusters via VSphereFailureDomain
and VSphereDeploymentZone
resource definitions. Equivalent to kubectl apply -f
, plus additional validation checks.
tanzu management-cluster available-zone set [FLAGS]
To add availability zones defined by the custom resource definitions in a file named multi-az-config.yaml
:
tanzu management-cluster available-zone set -f multi-az-config.yaml
-f, --file
The file containing VSphereFailureDomain
and VSphereDeploymentZone
resource definitions.
-h, --help
Help text.
Manages the status of VMware’s Customer Experience Improvement Program (CEIP). If your management cluster is running Tanzu Kubernetes Grid v1.6 or later, use tanzu telemetry to manage CEIP participation.
Available commands:
Gets the current CEIP status.
tanzu management-cluster ceip-participation get [FLAGS]
To get the current CEIP status:
tanzu management-cluster ceip-participation get
-h, --help
Help text.
-o, --output
Output format. Supported values are yaml
, json
, and table
.
Activates and deactivates CEIP participation.
tanzu management-cluster ceip-participation set [TRUE-OR-FALSE] [FLAGS]
To activate CEIP participation:
tanzu management-cluster ceip-participation set true
To deactivate CEIP participation:
tanzu management-cluster ceip-participation set false
-h, --help
Help text.
--labels
Optional labels. For example, --labels=entitlement-account-number="MY-EAN",env-type="dev"
, where MY-EAN
is your Entitlement Account Number.
Creates a Tanzu Kubernetes Grid management cluster on your target infrastructure. For more information about creating management clusters in Tanzu Kubernetes Grid, see Deploying Standalone Management Clusters.
tanzu management-cluster create [FLAGS]
To create a management cluster with the Tanzu Kubernetes Grid installer interface:
tanzu management-cluster create --ui
To create a management cluster from a configuration file, for example, example-configuration-file.yaml
:
tanzu management-cluster create --file example-configuration-file.yaml
To create a management cluster using an existing bootstrap cluster, for example, my-bootstrap-cluster
:
tanzu management-cluster create --use-existing-bootstrap-cluster my-bootstrap-cluster --file example-configuration-file.yaml
To preview the deployment manifest for a management cluster, use the --dry-run
option. For example:
tanzu management-cluster create --dry-run --file example-configuration-file.yaml > example-manifest.yaml
--acknowledge-CEIP
When this flag is specified, the command does not prompt you to acknowledge CEIP during cluster creation.
--additional-tkg-system-manifests
NoteThis flag is in development. Do not use.
Applies additional manifests to the bootstrap cluster in the tkg-system
namespace.
--az-file
Adds availability zones to the management cluster as configured by VSphereFailureDomain
and VSphereDeploymentZone
definitions in the specified file.
-b, --bind
The IP and port to serve the Tanzu Kubernetes Grid installer interface from. By default, tanzu management-cluster create --ui
opens the installer interface at http://127.0.0.1:8080
. For more information, see Installer Interface Options.
CautionServing the installer interface from a non-default IP address and port could expose the Tanzu CLI to a potential security risk while the interface is running. VMware recommends passing in to the
--bind
option an IP and port on a secure network.
--browser
The browser to open the Tanzu Kubernetes Grid installer interface in. When not specified, tanzu management-cluster create --ui
opens the installer interface in your default browser. Supported values are chrome
, firefox
, safari
, ie
, edge
, or none
. For more information, see Installer Interface Options.
--dry-run
Generates a deployment manifest from the management cluster configuration file passed to the --file
option and writes the output to stdout
. You can use this option to preview deployment manifests.
-f, --file
The configuration file from which to create the management cluster. For more information, see Deploy Management Clusters from a Configuration File.
--force-config-update
Updates ${HOME}/.config/tanzu/tkg/bom
and ${HOME}/.config/tanzu/tkg/compatibility
.
-h, --help
Help text.
-t, --timeout
The time to wait for the cluster provisioning to complete. The default waiting time is 30m0s
. Specify --timeout
in hours (h
), minutes (m
), and seconds (s
). For example, 2h
, 30m
, or 2h30m10s
.
-u, --ui
Launches the Tanzu Kubernetes Grid installer interface. For more information, see Deploy Management Clusters with the Installer Interface.
-e, --use-existing-bootstrap-cluster
When --use-existing-bootstrap-cluster
is specified, the command uses your existing bootstrap cluster to create the management cluster. Set the context of kubectl
to the bootstrap cluster before running tanzu management-cluster create
with this option. For more information, see Use an Existing Bootstrap Cluster to Deploy and Delete Management Clusters.
-y, --yes
When --yes
is specified, the command skips the confirmation step.
Configures the current credentials that the management cluster uses to access your infrastructure.
Available command:
Updates the credentials that the current management cluster uses to access vSphere or Azure (v0.31.x only). For more information, see Update Standalone Management and Workload Cluster Credentials.
tanzu management-cluster credentials update CLUSTER-NAME [FLAGS]
To update the credentials that are used by my-management-cluster
and all of the workload clusters it manages:
tanzu management-cluster credentials update my-management-cluster --cascading
To update the credentials that are used by my-management-cluster
without also updating them for its workload clusters:
tanzu management-cluster credentials update my-management-cluster
NoteThe
--azure-*
flags have been removed in version 0.32.0 oftanzu cluster credentials update
, due to the end of support for deployments to Azure.
--azure-client-id
The client ID of the app for Tanzu Kubernetes Grid that you registered in Azure.
--azure-client-secret
The client secret of the app for Tanzu Kubernetes Grid that you registered in Azure.
--azure-tenant-id
The tenant ID for Azure Active Directory in which the app for Tanzu Kubernetes Grid is located.
--cascading
When --cascading
is specified, the command updates the credentials for all of the workload clusters that are managed by the management cluster.
-h, --help
Help text.
--vsphere-password
The password for the vSphere account.
--vsphere-thumbprint
The SHA-1 signature of the vCenter Server TLS certificate.
--vsphere-user
The username for the vSphere account.
Deletes the current management cluster.
tanzu management-cluster delete [FLAGS]
To delete the current management cluster:
tanzu management-cluster delete
To delete the current management cluster even if there are workload clusters running in the cluster:
tanzu management-cluster delete --force
--force
When --force
is specified, the command deletes the management cluster even if there are workload clusters running in the management cluster. For more information, see Delete Management Clusters.
-h, --help
Help text.
-t, --timeout
The time to wait for the cluster deletion to complete. The default waiting time is 30m0s
. Specify --timeout
in hours (h
), minutes (m
), and seconds (s
). For example, 2h
, 30m
, or 2h30m10s
.
-e, --use-existing-cleanup-cluster
When --use-existing-cleanup-cluster
is specified, the command uses your existing bootstrap cluster to delete the management cluster. Set the context of kubectl
to the bootstrap cluster before running tanzu management-cluster delete
with this option. For more information, see Use an Existing Bootstrap Cluster to Deploy and Delete Management Clusters.
-y, --yes
When --yes
is specified, the command skips the confirmation step.
Shows the details of a management cluster. For more information, see Managing Your Management Clusters.
tanzu management-cluster get [FLAGS]
To see the details of a management cluster:
tanzu management-cluster get
-h, --help
Help text.
--show-all-conditions
A list of comma-separated objects, specified as kind
or kind/name
. all
shows conditions for all of the objects.
--show-details
Shows the details of MachineInfrastructure
and BootstrapConfig
when the Ready
condition is True
or it has the same Status
, Severity
, and Reason
as the machine’s object.
--show-group-members
Expands machine groups whose Ready
condition has the same Status
, Severity
, and Reason
.
Manages kubeconfig
files.
Available command:
Gets the kubeconfig
of the current management cluster and merges its context into the default kubeconfig
file. For more information, see Retrieve Management Cluster kubeconfig
.
tanzu management-cluster kubeconfig get [FLAGS]
To get the kubeconfig
:
tanzu management-cluster kubeconfig get
To get the admin kubeconfig
:
tanzu management-cluster kubeconfig get --admin
--admin
Gets the admin kubeconfig
of the management cluster.
--export-file
Saves the kubeconfig
file to the path that you specify.
-h, --help
Help text.
Configures identity and access management (IAM) for Tanzu Kubernetes Grid on AWS.
NoteThe
permissions
commands are removed in v0.32.0 of thetanzu management-cluster
command group, due to the end of support for deployments to AWS.
Available command:
Configures the IAM resources and permissions that Tanzu Kubernetes Grid needs to deploy and manage clusters on AWS. For more information, see Required AWS Permissions.
Available commands:
Generates a preview of the Tanzu Kubernetes Grid CloudFormation template. This template lists the IAM resources and permissions that Tanzu Kubernetes Grid needs to deploy and manage clusters on AWS.
tanzu management-cluster permissions aws generate-cloudformation-template [FLAGS]
To generate the CloudFormation template:
tanzu management-cluster permissions aws generate-cloudformation-template
-f, --file
The configuration file from which to read your AWS credentials. If not specified, tanzu management-cluster permissions aws generate-cloudformation-template
uses the default AWS credentials chain.
-h, --help
Help text.
Sets the IAM permissions that Tanzu Kubernetes Grid needs to deploy and manage clusters on AWS by creating a CloudFormation stack, tkg-cloud-vmware-com
, in your AWS account.
tanzu management-cluster permissions aws set [FLAGS]
To set the AWS permissions:
tanzu management-cluster permissions aws set
-f, --file
The configuration file from which to read your AWS credentials. If not specified, tanzu management-cluster permissions aws set
uses the default AWS credentials chain.
-h, --help
Help text.
Upgrades the current management cluster. For more information, see Upgrade Management Clusters and Select an OS During Cluster Upgrade.
ImportantWhile a management cluster is upgrading, do not run
tanzu cluster
ortanzu mc
commands against it or the workload clusters that it manages, for example from another bootstrap machine or shell window.
tanzu management-cluster upgrade [FLAGS]
To upgrade the current management cluster:
tanzu management-cluster upgrade
To upgrade the management cluster using the photon
OS:
tanzu management-cluster --os-name photon
To upgrade the management cluster using v20.04 of the ubuntu
OS:
tanzu management-cluster upgrade --os-name ubuntu --os-version 20.04
To upgrade the management cluster using v20.04 of the ubuntu
OS and the amd64
architecture:
tanzu management-cluster upgrade --os-name ubuntu --os-version 20.04 --os-arch amd64
-h, --help
Help text.
--os-arch
The OS architecture to use during the upgrade operation. Supported value is amd64
. If --os-arch
is not specified, tanzu management-cluster upgrade
discovers this parameter automatically.
--os-name
The OS name to use during the upgrade operation. Supported values Supported values:
ubuntu
on vSphere (all TKG versions)ubuntu
on AWS and Azure (TKG versions up to and including v2.4)photon
on vSphere (all TKG versions)amazon
on AWS (TKG versions up to and including v2.4)If --os-name
is not specified when upgrading a cluster, its nodes retain their existing --os-name
setting.
--os-version
The OS version to use during the upgrade operation. Supported values:
22.04
for Ubuntu on vSphere (from TKG v2.5 onwards)20.04
for Ubuntu on vSphere (all TKG versions)20.04
for Ubuntu on AWS and Azure (TKG versions up to and including v2.4)18.04
for Ubuntu on Azure (TKG versions up to and including v2.4)5
for Photon on vSphere (from TKG v2.5 onwards)5
and 3
for Photon on vSphere (all TKG versions)2
for amazon
on AWS (TKG versions up to and including v2.4)If --os-version
is not specified, tanzu management-cluster upgrade
discovers this parameter automatically.
-t, --timeout
The time to wait for the cluster upgrade to complete. The default waiting time is 30m0s
. Specify --timeout
in hours (h
), minutes (m
), and seconds (s
). For example, 2h
, 30m
, or 2h30m10s
.
--vsphere-vm-template-name
The path or name of the vSphere VM template to use for the cluster.
-y, --yes
When --yes
is specified, the command skips the confirmation step.