To install Tanzu Kubernetes Grid, you download the Tanzu Kubernetes Grid command line interface (CLI) on bootstrap machine. The bootstrap machine is the laptop, host, or server on which the initial bootstrapping of a management cluster is performed. The bootstrap machine is typically local, but it can also be a physical machine or VM that you access remotely.
The bootstrap machine 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 machine. 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, Mac OS, and Windows systems.
The bootstrap machine on which you run the Tanzu Kubernetes Grid CLI must meet the following requirements:
NOTE: Tanzu Kubernetes Grid uses Cluster API. If you have previously used Cluster API on the machine that you are using as your bootstrap machine, you must delete the
~/.cluster-api folder from that machine. This folder contains Cluster API configuration files that might interfere with the correct operation of Tanzu Kubernetes Grid.
tkg CLI ships with a compatible version of the
kubectl CLI. To download and unpack both:
Scroll down to the VMware Tanzu Kubernetes Grid 1.2.1 CLI and kubectl entries and click the Download Now button:
(Optional) Verify that your downloaded files are unaltered from the original. Tanzu Kubernetes Grid provides a SHA-1, a SHA-256, and an MD5 checksum for each download. To obtain these checksums, click Read more under the entry that you want to download. For more information, see Using Cryptographic Hashes.
Unpack the Tanzu Kubernetes Grid CLI binary for your operating system. To unpack the binary, use the extraction tool of your choice. For example, the
tar -xzvf command.
tkg folder, the unpacked CLI file is
tkg-windows-amd64-v1.2.1+vmware.1. The other files in the
tkg folder, such as
kbld, are required by the Tanzu Kubernetes Grid extensions. You will need them later when you install the extensions.
kubectl binary. The unpacked kubectl binary files are
After you have downloaded and unpacked the Tanzu Kubernetes Grid CLI binary on your bootstrap machine, you must make it available to the system.
Rename the CLI binary for your platform to
tkg and make it available to the system:
For Mac OS and Linux platforms:
mv ./tkg-linux-amd64-v1.2.1+vmware.1 /usr/local/bin/tkg
mv ./tkg-darwin-amd64-v1.2.1+vmware.1 /usr/local/bin/tkg
For Windows platforms:
Program Files\tkgfolder and copy the
tkg-windows-amd64-v1.2.1+vmware.1binary into it.
tkgfolder, select Properties > Security, and make sure that your user account has the Full Control permission.
Pathrow under System variables, and click Edit.
At the command line in a new terminal, run
tkg version to check that the correct version of the binary is properly installed.
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.
To install the version of
kubectl compatible with the Tanzu Kubernetes Grid CLI, use the same process as in Install the Tanzu Kubernetes Grid CLI above, but with the following substitutions:
kubectl(Linux, Mac) or
kubectl versionto check the correct version, and create a security exception if needed.
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.
tkg get management-cluster command.
tkg get management-cluster
tkg command for the first time creates the
~/.tkg folder in your home directory, that contains the Tanzu Kubernetes Grid configuration files.
~/.tkg/config.yaml, from which management clusters and Tanzu Kubernetes clusters are created.
bom-*.yamlfiles that provide references to the correct versions of all of the packages that Tanzu Kubernetes Grid requires when creating clusters for all of the versions of Kubernetes that it supports.
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 cluster configuration file, if it is not stored in the default location with the default name,
||Show help for the current command. For example,
||The path to the shared
||Specify a file in which to save the logs for the current command. For example,
||Amount of time that the current command allows for each internal operation to complete. This option is not a timeout for overall cluster creation. Specify the timeout interval in hours (
||Mute all output for the current command.|
||Set the logging verbosity level for the command.|
The Tanzu Kubernetes Grid CLI is ready. You can set up your bootstrap machine to deploy management clusters to vSphere, Amazon EC2, and Microsoft Azure.