By default, when you deploy a management cluster by running
tkg init, Tanzu Kubernetes Grid creates a temporary
kind cluster on the bootstrap machine, that it uses to provision the final management cluster. This temporary cluster is removed after the deployment of the final management cluster to vSphere, Amazon EC2, or Azure completes successfully. The same process of creating a temporary
kind cluster also applies when you run
tkg delete management-cluster to remove a management cluster.
In some circumstances, it might be desirable to keep the local bootstrap cluster after deploying or deleting a management cluster. For example, you might want to examine the objects in the cluster or review its logs. In this case, you can skip the creation of the
kind cluster and use any Kubernetes cluster that already exists on your bootstrap machine as the local bootstrap cluster.
kindcluster that Tanzu Kubernetes Grid provides to bootstrap your management clusters.
The May 2021 Linux security patch causes
kind clusters to fail during management cluster creation. If you run Tanzu Kubernetes Grid CLI commands on a machine with a recent Linux kernel, for example Linux 5.11 and 5.12 with Fedora,
kind clusters do not operate. This happens because
kube-proxy attempts to change
nf_conntrack_max sysctl, which was made read-only in the May 2021 Linux security patch, and
kube-proxy enters a
CrashLoopBackoff state. The security patch is being backported to all LTS kernels from 4.9 onwards, so as operating system updates are shipped, including for Docker Machine on Mac OS and Windows Subsystem for Linux,
kind clusters will fail, resulting in management cluster deployment failure. In this case you must do the following:
Download and install a version of kind that is at least version v0.11.
For information about how to download and install kind, see the kind documentation.
kind create cluster
tkg initwith the
Set the context of
kubectl to the local Kubernetes cluster that you want to use as a bootstrap cluster.
kubectl config use-context my-bootstrap-cluster-admin@my-bootstrap-cluster
To create a management cluster, run the
tkg init command and specify the
tkg init --infrastructure=vsphere --use-existing-bootstrap-cluster my-bootstrap-cluster
To delete a management cluster, run the
tkg delete management-cluster command and specify the
If you are deleting a management cluster, first run
tkg get management-cluster and
tkg set management-cluster to make sure that the context of the Tanzu Kubernetes Grid CLI is set to the management cluster to delete.
tkg delete management-cluster --use-existing-bootstrap-cluster my-bootstrap-cluster