CLI plugin: management-cluster
| Primarily used for: Tanzu Kubernetes Grid
The tanzu management-cluster
command group performs management cluster operations. This command group includes the following commands:
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.
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
.
Manages the status of VMware’s Customer Experience Improvement Program (CEIP). If your management cluster was created using Tanzu Kubernetes Grid v1.6 or later or upgraded to Tanzu Kubernetes Grid v1.6 or later, you can alternatively use tanzu telemetry to manage CEIP participation.
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
--additional-tkg-system-manifests
NoteThis flag is in development. Do not use.
Applies additional manifests to the bootstrap cluster in the tkg-system
namespace.
-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.
Command:
tanzu management-cluster credentials update
Updates the vSphere or Azure credentials that the current management cluster uses to access vSphere or Azure. 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
--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-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.
Command:
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
.
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.
This command is in development. Do not use.
Configures identity and access management (IAM) for Tanzu Kubernetes Grid.
Command:
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.
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.
ImportantDo not run
tanzu
commands against a management cluster while it is upgrading, 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 are ubuntu
(v20.04 on vSphere, AWS, and Azure; v20.04 and v18.04 on Azure), photon
(v3 on vSphere), and amazon
(v2 on AWS). 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 are 20.04
for Ubuntu on vSphere, AWS, and Azure and 20.04
and 18.04
for Ubuntu on Azure, 3
for Photon on vSphere, and 2
for amazon
on AWS. 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
.
-y, --yes
When --yes
is specified, the command skips the confirmation step.