The Tanzu Kubernetes Grid bundle includes the Tanzu Kubernetes Grid CLI binaries and cluster plans from which Tanzu Kubernetes Grid deploys clusters. Tanzu Kubernetes Grid also provides the base OS images from which node VMs are created, that include the supported versions of Kubernetes and Cluster API.
To use Tanzu Kubernetes Grid, you download and run the Tanzu Kubernetes Grid CLI on a local system, known as the bootstrap environment. The bootstrap environment is the laptop, host, or server on which the initial bootstrapping of a management cluster is performed. This is where you run Tanzu Kubernetes Grid CLI commands. Tanzu Kubernetes Grid creates a temporary management cluster using a Kubernetes in Docker (
kind) cluster on the bootstrap environment. After creating the temporary management cluster locally, Tanzu Kubernetes Grid uses it to provision the final management cluster in the platform of your choice.
Tanzu Kubernetes Grid provides CLI binaries for Linux and Mac OS systems.
The bootstrap environment on which you run the Tanzu Kubernetes Grid CLI must meet the following requirements:
If you are running Docker Desktop on Mac OS, the
kind container requires at least 6GB of RAM. For information about how to configure Docker Desktop so that it can run
kind, see Settings for Docker Desktop in the
NOTE: If you have previously used Cluster API on the machine that you are using as your bootstrap environment, you must delete the
~/.cluster-api folder from that machine. This folder contains configuration files that might interfere with the correct interoperation of Cluster API and Tanzu Kubernetes Grid.
Download the Tanzu Kubernetes Grid CLI to the machine to use as the bootstrap environment.
Use either the
gunzip command or the extraction tool of your choice to unpack the binaries. Run either one of the following commands:
The unpacked files are
After you have downloaded and unpacked the Tanzu Kubernetes Grid CLI binary to your bootstrap environment, you must make it available to the system.
Navigate to the executable for the Tanzu Kubernetes Grid CLI.
Rename the CLI binary for your platform to
tkg, make sure that it is executable, and add it to your
/usr/local/binfolder and rename it to
mv ./tkg-linux-amd64 /usr/local/bin/tkg
mv ./tkg-darwin-amd64 /usr/local/bin/tkg
chmod +x /usr/local/bin/tkg
At the command line in a new terminal, run
tkg to see help for the full list of commands and options that the Tanzu Kubernetes Grid CLI provides.
tkg version to check that the correct version of the binary is properly installed.
You should see information about the installed Tanzu Kubernetes Grid CLI version.
Client: Version: v1.0.0 Git commit: 60f6fd5f40101d6b78e95a33334498ecca86176e
tkg --help to see the list of commands that the Tanzu Kubernetes Grid CLI provides.
You can run any command with the
--help option to see information about that specific command or sub-command. For example,
tkg init --help or
tkg create cluster --help.
If you are running on Mac OS, you might encounter the following error:
"tkg" cannot be opened because the developer cannot be verified.
If this happens, you need to create a security exception for the
tkg executable. Locate the
tkg app in Finder, control-click the app, and select Open.
Most of the Tanzu Kubernetes Grid CLI commands and options have short names or aliases, so that you do not have to type the full command and option names each time you run
tkg. For example,
management-cluster. For increased clarity, this documentation always uses the full command and option names. To see the shortnames and aliases for commands and options, run CLI commands with the
The Tanzu Kubernetes Grid CLI provides common options that can be used with all of the CLI commands.
||The path to the management cluster configuration file, if it is not stored in the default location,
||Show help for the current command. For example,
||The path to the
||Specify a file in which to save the logs for the current command. For example,
||Mute all output for the current command.|
||Set the logging verbosity level for the command.|
The Tanzu Kubernetes Grid CLI is ready to use. You can use the Tanzu Kubernetes Grid installer interface or CLI to deploy a management cluster to either vSphere or Amazon EC2.
If you have vSphere 7.0 and the vSphere with Kubernetes feature is enabled, you can directly use the Tanzu Kubernetes Grid CLI to deploy Tanzu Kubernetes clusters to vSphere with Kubernetes. For information about how to connect the Tanzu Kubernetes Grid CLI to a vSphere with Kubernetes Supervisor Cluster, see Use the Tanzu Kubernetes Grid CLI with a vSphere with Kubernetes Supervisor Cluster .