tanzu management-cluster

Performs management cluster operations.

Note

The 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.

Usage

CLI plugin: management-cluster | Target: kubernetes | Primarily used for: Platform operations | Release Notes

Syntax:

tanzu management-cluster [COMMAND]

Aliases

management-cluster, mc, and management-clusters

Global Flags

-h, --help

Help text.

--log-file

Path to the log file.

-v, --verbose

Log verbosity, from 0 to 9.

tanzu management-cluster available-zone

(vSphere only) Manages availability zones for class-based clusters.

Available commands:

tanzu management-cluster available-zone delete

Deletes the specified availability zone from the management cluster.

Usage

tanzu management-cluster available-zone delete AZ-NAME [FLAGS]

Example

To delete example-az:

tanzu management-cluster available-zone delete example-az

Flags

-h, --help

Help text.

-y, --yes

When --yes is specified, the command skips the confirmation step.

tanzu management-cluster available-zone list

Lists availability zones.

Usage

tanzu management-cluster available-zone list [FLAGS]

Example

To list all availability zones defined in the management cluster:

tanzu management-cluster available-zone list -a

Flags

-a, --all

Lists all availability zones.

-c, --cluster

Lists availability zones used by the specified workload cluster.

-h, --help

Help text.

tanzu management-cluster available-zone set

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.

Usage

tanzu management-cluster available-zone set [FLAGS]

Example

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

Flags

-f, --file

The file containing VSphereFailureDomain and VSphereDeploymentZone resource definitions.

-h, --help

Help text.

tanzu management-cluster ceip-participation

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:

tanzu management-cluster ceip-participation get

Gets the current CEIP status.

Usage

tanzu management-cluster ceip-participation get [FLAGS]

Example

To get the current CEIP status:

tanzu management-cluster ceip-participation get

Flags

-h, --help

Help text.

-o, --output

Output format. Supported values are yaml, json, and table.

tanzu management-cluster ceip-participation set

Activates and deactivates CEIP participation.

Usage

tanzu management-cluster ceip-participation set [TRUE-OR-FALSE] [FLAGS]

Examples

To activate CEIP participation:

tanzu management-cluster ceip-participation set true

To deactivate CEIP participation:

tanzu management-cluster ceip-participation set false

Flags

-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.

tanzu management-cluster create

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.

Usage

tanzu management-cluster create [FLAGS]

Examples

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

Flags

--acknowledge-CEIP

When this flag is specified, the command does not prompt you to acknowledge CEIP during cluster creation.

--additional-tkg-system-manifests

Note

This 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.

Caution

Serving 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.

tanzu management-cluster credentials

Configures the current credentials that the management cluster uses to access your infrastructure.

Available command:

update

tanzu management-cluster credentials update

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.

Usage

tanzu management-cluster credentials update CLUSTER-NAME [FLAGS]

Examples

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

Flags

Note

The --azure-* flags have been removed in version 0.32.0 of tanzu 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.

tanzu management-cluster delete

Deletes the current management cluster.

Usage

tanzu management-cluster delete [FLAGS]

Examples

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

Flags

--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.

tanzu management-cluster get

Shows the details of a management cluster. For more information, see Managing Your Management Clusters.

Usage

tanzu management-cluster get [FLAGS]

Example

To see the details of a management cluster:

tanzu management-cluster get

Flags

-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.

tanzu management-cluster kubeconfig

Manages kubeconfig files.

Available command:

get

tanzu management-cluster kubeconfig get

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.

Usage

tanzu management-cluster kubeconfig get [FLAGS]

Examples

To get the kubeconfig:

tanzu management-cluster kubeconfig get

To get the admin kubeconfig:

tanzu management-cluster kubeconfig get --admin

Flags

--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.

tanzu management-cluster permissions

Configures identity and access management (IAM) for Tanzu Kubernetes Grid on AWS.

Note

The permissions commands are removed in v0.32.0 of the tanzu management-cluster command group, due to the end of support for deployments to AWS.

Available command:

aws

tanzu management-cluster permissions aws

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:

tanzu management-cluster permissions aws generate-cloudformation-template

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.

Usage
tanzu management-cluster permissions aws generate-cloudformation-template [FLAGS]
Example

To generate the CloudFormation template:

tanzu management-cluster permissions aws generate-cloudformation-template
Flags

-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.

tanzu management-cluster permissions aws set

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.

Usage
tanzu management-cluster permissions aws set [FLAGS]
Example

To set the AWS permissions:

tanzu management-cluster permissions aws set
Flags

-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.

tanzu management-cluster upgrade

Upgrades the current management cluster. For more information, see Upgrade Management Clusters and Select an OS During Cluster Upgrade.

Important

While a management cluster is upgrading, do not run tanzu cluster or tanzu mc commands against it or the workload clusters that it manages, for example from another bootstrap machine or shell window.

Usage

tanzu management-cluster upgrade [FLAGS]

Examples

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

Flags

-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.

check-circle-line exclamation-circle-line close-line
Scroll to top icon