You provision Tanzu Kubernetes clusters by invoking the Tanzu Kubernetes Grid Service declarative API. Once a cluster is provisioned, you can use custom resources to manage it, and deploy workloads using kubectl.

Workflow for Creating Tanzu Kubernetes Clusters

The workflow provides a high-level overview of the provisioning process. Each of the steps has links for more information about the specific task.

  1. Verify with your vSphere administrator that the following prerequisites are completed.
    1. vSphere with Kubernetes (Workload Management) is enabled for your data center.
    2. A Supervisor Namespace is created and configured for hosting the Tanzu Kubernetes cluster.
      • Edit permissions are added for one or more DevOps engineers to access the Supervisor Namespace using their vCenter Single Sign-On credentials.
      • A tag-based storage policy is defined and associated with the Supervisor Namespace.
      • Capacity and usage quotas are verified and adjusted, as necessary.
  2. To host the OVA files to create Tanzu Kubernetes cluster nodes, create a Subscribed Content Library on a shared datastore . For more information, see Create a Subscribed Content Library for Tanzu Kubernetes Clusters.
  3. To connect to and operate Tanzu Kubernetes clusters, download and install the Kubernetes CLI Tools for vSphere. For more information, see Download and Install the Kubernetes CLI Tools for vSphere.
  4. To provision Tanzu Kubernetes clusters, authenticate with the Supervisor Cluster. For more information, see Connect to the Supervisor Cluster as a vCenter Single Sign-On User.
  5. To define the specification for a Tanzu Kubernetes cluster, create the cluster configuration YAML file as follows.
    1. To review the list of configuration parameters for provisioning Tanzu Kubernetes clusters, see Configuration Parameters for Tanzu Kubernetes Clusters.
    2. To list the available virtual machine classes and decide which to use, run the following command. For more information, see Virtual Machine Class Types for Tanzu Kubernetes Clusters.
      kubectl describe virtualmachineclasses
    3. To determine available storage classes and decide which to use, run the following command. For more information, see Storage in vSphere with Kubernetes.
      kubectl describe namespace
    4. To list available Kubernetes software versions, run the following command.
      kubectl get virtualmachineimages
    5. To construct the YAML file for provisioning the Tanzu Kubernetes cluster, use the information gleaned from substeps a, b, c, and d, and refer to the examples: Example YAML Files for Provisioning Tanzu Kubernetes Clusters.
  6. To provision the cluster, run the following command. For more information, see Provision a Tanzu Kubernetes Cluster.
    kubectl apply -f CLUSTER-NAME.yaml
  7. To monitor the deployment of cluster nodes, use the vSphere Client and kubectl. For more information, see Monitor Tanzu Kubernetes Cluster Status Using the vSphere Client and Monitor Tanzu Kubernetes Cluster Status Using kubectl.
  8. To log in to the cluster, use the vSphere Plugin for kubectl. For more information, see Connect to a Tanzu Kubernetes Cluster as a vCenter Single Sign-On User.
  9. To verify Tanzu Kubernetes cluster creation, deploy an example workload. For more information, see the following topics:
    Note: Tanzu Kubernetes clusters have pod security policy enabled. Depending on the workload and user, you might need to create an appropriate RoleBinding or custom PodSecurityPolicy. For more information, see Using Pod Security Policies with Tanzu Kubernetes Clusters.