VMware Tanzu CLI Cheatsheet
#
VMware Tanzu CLI provides commands to manage VMware Tanzu Kubernetes Grid (TKG) environments. These commands help administrators perform tasks related to cluster management, workload operations, and Tanzu-specific configurations directly from the command line.
General Commands
#
Command/Option | Example | Description |
---|
tanzu version | tanzu version | Display the Tanzu CLI version |
tanzu config list | tanzu config list | List all Tanzu CLI configurations |
tanzu config set | tanzu config set <key> <value> | Set a Tanzu CLI configuration |
tanzu config get | tanzu config get <key> | Get the value of a Tanzu CLI configuration |
Cluster Management
#
Command/Option | Example | Description |
---|
tanzu cluster list | tanzu cluster list | List all Tanzu Kubernetes clusters |
tanzu cluster create | tanzu cluster create <cluster_name> --plan <plan> | Create a new Tanzu Kubernetes cluster |
tanzu cluster delete | tanzu cluster delete <cluster_name> | Delete a Tanzu Kubernetes cluster |
tanzu cluster scale | tanzu cluster scale <cluster_name> --worker-count <count> | Scale the number of worker nodes in a cluster |
tanzu cluster get | tanzu cluster get <cluster_name> | Get details of a specific cluster |
Namespace Management
#
Command/Option | Example | Description |
---|
tanzu namespace list | tanzu namespace list | List all namespaces in a cluster |
tanzu namespace create | tanzu namespace create <namespace_name> | Create a new namespace in a cluster |
tanzu namespace delete | tanzu namespace delete <namespace_name> | Delete a namespace from a cluster |
Workload Management
#
Command/Option | Example | Description |
---|
tanzu apps workload list | tanzu apps workload list | List all workloads in a namespace |
tanzu apps workload create | tanzu apps workload create <workload_name> --namespace <namespace_name> --file <workload_file> | Create a new workload in a namespace |
tanzu apps workload delete | tanzu apps workload delete <workload_name> --namespace <namespace_name> | Delete a workload from a namespace |
tanzu apps workload get | tanzu apps workload get <workload_name> --namespace <namespace_name> | Get details of a specific workload |
Package Management
#
Command/Option | Example | Description |
---|
tanzu package list | tanzu package list | List all available packages |
tanzu package install | tanzu package install <package_name> --namespace <namespace_name> --version <version> | Install a package in a namespace |
tanzu package delete | tanzu package delete <package_name> --namespace <namespace_name> | Delete a package from a namespace |
tanzu package update | tanzu package update <package_name> --namespace <namespace_name> --version <new_version> | Update a package to a new version |
Image Management
#
Command/Option | Example | Description |
---|
tanzu image list | tanzu image list | List all images in a registry |
tanzu image push | tanzu image push <image_name> --file <image_file> | Push an image to a registry |
tanzu image pull | tanzu image pull <image_name> | Pull an image from a registry |
tanzu image delete | tanzu image delete <image_name> | Delete an image from a registry |
Diagnostics and Troubleshooting
#
Command/Option | Example | Description |
---|
tanzu diagnostics collect | tanzu diagnostics collect --namespace <namespace_name> | Collect diagnostic information from a namespace |
tanzu diagnostics analyze | tanzu diagnostics analyze --file <diagnostic_file> | Analyze a diagnostic file for issues |
tanzu diagnostics report | tanzu diagnostics report --namespace <namespace_name> | Generate a diagnostics report for a namespace |
This cheatsheet covers the most commonly used VMware Tanzu CLI commands and options, helping you to manage clusters, namespaces, workloads, packages, images, and perform diagnostics and troubleshooting effectively.