This topic provides general information about deploying and managing Tanzu Kubernetes clusters.

Before you can create Tanzu Kubernetes clusters, you must install the Tanzu CLI and deploy a management cluster. For information, see Install the Tanzu CLI and Other Tools and Deploy Management Clusters.

About Tanzu Kubernetes Clusters

In VMware Tanzu Kubernetes Grid, Tanzu Kubernetes clusters are the Kubernetes clusters in which your application workloads run.

Tanzu Kubernetes Grid automatically deploys clusters to the platform on which you deployed the management cluster. For example, you cannot deploy clusters to Amazon EC2 or Azure from a management cluster that is running in vSphere, or the reverse. It is not possible to use shared services between the different providers because, for example, vSphere clusters are reliant on sharing vSphere networks and storage, while Amazon EC2 and Azure use their own systems. Tanzu Kubernetes Grid automatically deploys clusters from whichever management cluster you have set as the context for the CLI by using the tanzu login command. For information about tanzu login, see Manage Your Management Clusters.

  • For information about how to use the Tanzu CLI to deploy Tanzu Kubernetes clusters, see Deploy Tanzu Kubernetes Clusters and its subtopics.
  • After you have deployed Tanzu Kubernetes clusters, the Tanzu CLI provides commands and options to perform the cluster lifecycle management operations described in Manage Clusters.

For information about how to upgrade existing clusters to a new version of Kubernetes, see Upgrade Tanzu Kubernetes Clusters.

Tanzu Kubernetes Clusters, kubectl, and kubeconfig

When you create a management cluster, the Tanzu CLI and kubectl contexts are automatically set to that management cluster. However, Tanzu Kubernetes Grid does not automatically set the kubectl context to a Tanzu Kubernetes cluster when you create it. You must set the kubectl context to a Tanzu Kubernetes cluster manually by using the kubectl config use-context command.

By default, unless you specify the KUBECONFIG option to save the kubeconfig for a cluster to a specific file, all Tanzu Kubernetes clusters that you deploy are added to a shared .kube/config file. If you delete the shared .kube/config file and you still have the .kube-tkg/config file for the management cluster, you can recover the .kube/config of the Tanzu Kubernetes clusters with the tanzu cluster kubeconfig get <my-cluster> command.

Do not change context or edit the .kube-tkg/config or .kube/config files while Tanzu Kubernetes Grid operations are running.

Using the Tanzu CLI to Create and Manage Clusters in vSphere with Tanzu

If you have vSphere 7 and you have enabled the vSphere with Tanzu feature, you can use the Tanzu CLI to interact with the vSphere with Tanzu Supervisor Cluster, to deploy Tanzu Kubernetes clusters in vSphere with Tanzu. For more information, see Add a vSphere7 Supervisor Cluster as a Management Cluster.

Create Tanzu Kubernetes Cluster Manifest Files

You can use the Tanzu CLI to create cluster manifest files for Tanzu Kubernetes clusters without actually creating the clusters. To generate a cluster manifest YAML file that you can pass to kubectl apply -f, run the tanzu cluster create command with the --dry-run option and save the output to a file. Use the same options and configuration --file that you would use if you were creating the cluster, for example:

tanzu cluster create my-cluster --file my-cluster-config.yaml --dry-run > my-cluster-manifest.yaml

You can then use kubectl to deploy the cluster from the manifest as described in Deploy a Cluster from a Saved Manifest File.

Configure Common Settings

You configure proxies, Machine Health Check, private registries, and Antrea on Tanzu Kubernetes Clusters in the same way as you do for management clusters. For information, see Create a Management Cluster Configuration File.

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