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.
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 upgrade existing clusters to a new version of Kubernetes, see Upgrade Tanzu Kubernetes Clusters.
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/config files while Tanzu Kubernetes Grid operations are running.
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.
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.
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.