VMware Tanzu CLI

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/OptionExampleDescription
tanzu versiontanzu versionDisplay the Tanzu CLI version
tanzu config listtanzu config listList all Tanzu CLI configurations
tanzu config settanzu config set <key> <value>Set a Tanzu CLI configuration
tanzu config gettanzu config get <key>Get the value of a Tanzu CLI configuration

Cluster Management #

Command/OptionExampleDescription
tanzu cluster listtanzu cluster listList all Tanzu Kubernetes clusters
tanzu cluster createtanzu cluster create <cluster_name> --plan <plan>Create a new Tanzu Kubernetes cluster
tanzu cluster deletetanzu cluster delete <cluster_name>Delete a Tanzu Kubernetes cluster
tanzu cluster scaletanzu cluster scale <cluster_name> --worker-count <count>Scale the number of worker nodes in a cluster
tanzu cluster gettanzu cluster get <cluster_name>Get details of a specific cluster

Namespace Management #

Command/OptionExampleDescription
tanzu namespace listtanzu namespace listList all namespaces in a cluster
tanzu namespace createtanzu namespace create <namespace_name>Create a new namespace in a cluster
tanzu namespace deletetanzu namespace delete <namespace_name>Delete a namespace from a cluster

Workload Management #

Command/OptionExampleDescription
tanzu apps workload listtanzu apps workload listList all workloads in a namespace
tanzu apps workload createtanzu apps workload create <workload_name> --namespace <namespace_name> --file <workload_file>Create a new workload in a namespace
tanzu apps workload deletetanzu apps workload delete <workload_name> --namespace <namespace_name>Delete a workload from a namespace
tanzu apps workload gettanzu apps workload get <workload_name> --namespace <namespace_name>Get details of a specific workload

Package Management #

Command/OptionExampleDescription
tanzu package listtanzu package listList all available packages
tanzu package installtanzu package install <package_name> --namespace <namespace_name> --version <version>Install a package in a namespace
tanzu package deletetanzu package delete <package_name> --namespace <namespace_name>Delete a package from a namespace
tanzu package updatetanzu package update <package_name> --namespace <namespace_name> --version <new_version>Update a package to a new version

Image Management #

Command/OptionExampleDescription
tanzu image listtanzu image listList all images in a registry
tanzu image pushtanzu image push <image_name> --file <image_file>Push an image to a registry
tanzu image pulltanzu image pull <image_name>Pull an image from a registry
tanzu image deletetanzu image delete <image_name>Delete an image from a registry

Diagnostics and Troubleshooting #

Command/OptionExampleDescription
tanzu diagnostics collecttanzu diagnostics collect --namespace <namespace_name>Collect diagnostic information from a namespace
tanzu diagnostics analyzetanzu diagnostics analyze --file <diagnostic_file>Analyze a diagnostic file for issues
tanzu diagnostics reporttanzu 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.

VMware Tanzu CLI

Explore our comprehensive cheatsheets to enhance your knowledge and efficiency. Each cheatsheet provides detailed command options, examples, and descriptions to help you master various tools and technologies.