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.
- Verify with your vSphere administrator that the following prerequisites are completed.
- vSphere with Kubernetes (Workload Management) is enabled for your data center.
- 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.
- 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.
- 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.
- 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.
- To define the specification for a Tanzu Kubernetes cluster, create the cluster configuration YAML file as follows.
- To review the list of configuration parameters for provisioning Tanzu Kubernetes clusters, see Configuration Parameters for Tanzu Kubernetes Clusters.
- 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
- 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 SUPERVISOR-NAMESPACE
- To list available Kubernetes software versions, run the following command.
kubectl get virtualmachineimages
- 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.
- To provision the cluster, run the following command. For more information, see Provision a Tanzu Kubernetes Cluster.
kubectl apply -f CLUSTER-NAME.yaml
- 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.
- 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.
- 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.
- Tanzu Kubernetes Workload Example
- Tanzu Kubernetes Service Load Balancer Example
- Tanzu Kubernetes Ingress Example
- Tanzu Kubernetes Persistent Volume Claim Example