Tanzu CLI Command Reference

The table below lists all of the commands and options of the Tanzu CLI, and provides links to the section in which they are documented.

To install the Tanzu CLI, see Install the Tanzu CLI and Other Tools.

Command Options Description
tanzu *
-h, –help
Common Tanzu Kubernetes Grid Options
tanzu completion * Output shell completion code for the specified shell
tanzu cluster *
–log-file
-v,, –verbose
tanzu cluster available-upgrades get Upgrade Tanzu Kubernetes Clusters
tanzu cluster create
-d, –dry-run Create Tanzu Kubernetes Cluster Manifest Files
-f, –file Deploy Tanzu Kubernetes Clusters
–tkr Deploy Tanzu Kubernetes Clusters with Different Kubernetes Versions
Add a vSphere with Tanzu Supervisor Cluster as a Management Cluster
tanzu cluster credentials update
-n, –namespace
–vsphere-password
–vsphere-user
Manage Cluster Secrets
tanzu cluster delete
-n, –namespace
-y, –yes
Delete Tanzu Kubernetes Clusters
tanzu cluster get
–disable-grouping
–disable-no-echo
-n, –namespace –show-all-conditions
Deploy Tanzu Kubernetes Clusters
tanzu cluster kubeconfig get Deploy Tanzu Kubernetes Clusters
Connect to and Examine Tanzu Kubernetes Clusters
–admin
–export-file
-n, –namespace
Connect to and Examine Tanzu Kubernetes Clusters
Upgrade Tanzu Kubernetes Clusters
tanzu cluster list
–include-management-cluster Connect to and Examine Tanzu Kubernetes Clusters
Upgrade Management Clusters
Upgrade Tanzu Kubernetes Clusters
-n, –namespace
-o, –output
Connect to and Examine Tanzu Kubernetes Clusters
tanzu cluster machinehealthcheck Configure Machine Health Checks for Tanzu Kubernetes Clusters
tanzu cluster node-pool set
-f, –file
–namespace
Manage Node Pools of Different VM Types
tanzu cluster node-pool list
-n, –namespace
-o, –output
Manage Node Pools of Different VM Types
tanzu cluster node-pool delete
-n, –name
–namespace
Manage Node Pools of Different VM Types
tanzu cluster scale
-c, –controlplane-machine-count
-n, –namespace
-w, –worker-machine-count
Manage Your Management Clusters
Scale Tanzu Kubernetes Clusters
tanzu cluster upgrade
-n, –namespace
–os-arch
–os-name
–os-version
-t, –timeout
–tkr
-y, –yes
Upgrade Tanzu Kubernetes Clusters
Deploy Tanzu Kubernetes Clusters with Different Kubernetes Versions
tanzu config init Initializes the configuration with defaults
tanzu config server delete
-y, –yes Delete Management Clusters from Your Tanzu CLI Configuration
tanzu config server list Delete Management Clusters from Your Tanzu CLI Configuration
tanzu config show Shows the current configuration
tanzu init Not available in this version of the Tanzu CLI
tanzu kubernetes-release get
tanzu kubernetes-release available-upgrades get
Deploy Tanzu Kubernetes Clusters with Different Kubernetes Versions
Upgrade Tanzu Kubernetes Clusters
Add a vSphere with Tanzu Supervisor Cluster as a Management Cluster
tanzu kubernetes-release os get
–region
tanzu login
–apiToken
–context
–endpoint
–kubeconfig
–name
–server
Connect to and Examine Tanzu Kubernetes Clusters
Manage Your Management Clusters
Add a vSphere with Tanzu Supervisor Cluster as a Management Cluster
tanzu management-cluster ceip-participation get
tanzu management-cluster ceip-participation set
Opt In or Out of the VMware CEIP
tanzu management-cluster create
-b, –bind
–browser
-u, –ui
Deploy Management Clusters with the Installer Interface
-f, –file
-t, –timeout
-y, –yes
–dry-run
Deploy Management Clusters from a Configuration File
-e, –use-existing-bootstrap-cluster
Use an Existing Bootstrap Cluster to Deploy and Delete Management Clusters
tanzu management-cluster credentials update Manage Cluster Secrets
tanzu management-cluster delete Delete Management Clusters
tanzu management-cluster get Connect to and Examine Tanzu Kubernetes Clusters
Examine the Management Cluster Deployment
Manage Your Management Clusters
Upgrade Management Clusters

tanzu management-cluster import. This command is not used in TKG 1.4. Upgrade Tanzu Kubernetes Grid
tanzu management-cluster kubeconfig get
–admin
–export-file
Examine the Management Cluster Deployment
Configure Identity Management After Management Cluster Deployment
tanzu management-cluster register (v1.4.0 only) If you are using Tanzu Kubernetes Grid v1.4.0, ignore this command. Not available in v1.4.1 and later. For more information, see Register Your Management Cluster with Tanzu Mission Control.
tanzu management-cluster permissions aws set Create a Cluster Configuration File for Amazon EC2
tanzu management-cluster upgrade
–os-arch
–os-name
–os-version
-t, –timeout
-y, –yes
Upgrade Management Clusters
tanzu package Installs and manages packages and package repositories
tanzu pinniped-auth Pinniped authentication operations
tanzu pinniped-auth login
–ca-bundle strings, –client-id string, –concierge-authenticator-name string, –concierge-authenticator-type, –concierge-ca-bundle-data string, –concierge-authenticator-name string, –concierge-authenticator-type, –concierge-ca-bundle-data string, –concierge-endpoint string, –concierge-namespace string, –enable-concierge, –issuer string, –listen-port uint16, –request-audience string, –scopes strings, –session-cache string, –skip-browser
Log in using an OpenID Connect provider
tanzu plugin clean
tanzu plugin install
tanzu plugin list
Install the Tanzu CLI
tanzu plugin delete * Deletes a Tanzu plugin
tanzu plugin describe * Describes a Tanzu plugin
tanzu plugin upgrade * Upgrades a Tanzu plugin
tanzu update * Updates the Tanzu CLI
tanzu version Shows the current Tanzu CLI version

* Some tanzu plugin commands such as tanzu plugin repo and tanzu plugin update are not functional in the current release.

Renew CLI Certificate

On the bootstrap machine, the CLI uses a certificate that is stored locally to authenticate with the management cluster. If the certificate expires, you will see failed error messages when running tkg or tanzu CLI commands.

Therefore, when the certificate nears expiration, follow these steps to renew the certificate. The following steps use tanzu CLI commands.

  1. Get the name of the management cluster.

    tanzu management-cluster get

  2. Get the cluster configuration data. You will copy the data to populate the ~/.kube-tkg/config file.

    kubectl -n tkg-system get secrets <cluster name>-kubeconfig -o 'go-template={{ index .data "value"}}' | base64 -d > mc_kubeconfig.yaml

    Where, <cluster name> is the name of the management cluster.

    apiVersion: v1
    clusters:
    - cluster:
      certificate-authority-data: LS0tLS1CRUdJTiBD<redacted>
      server: https://192.168.100.90:6443
      name: tkg-mgmt
    contexts:
    - context:
      cluster: tkg-mgmt
      user: tkg-mgmt-admin
      name: tkg-mgmt-admin@tkg-mgmt
    current-context: tkg-mgmt-admin@tkg-mgmt
    kind: Config
    preferences: {}
    users:
    - name: tkg-mgmt-admin
      user:
      client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZ<redacted>
      client-key-data: LS0tLS1CRUdJTiBSU<redacted>`
    
  3. Delete the existing management cluster entry from Tanzu managed servers.

    tanzu config server delete <cluster-name>

  4. Use tanzu login command to add the management-cluster entry with the new updated kubeconfig.

    tanzu login --kubeconfig mc_kubeconfig.yaml --name <cluster-name> --context <cluster-name>-admin@<cluster-name>

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