Preparing the Kubernetes Cluster
This topic describes how to create and configure Kubernetes clusters to support Tanzu Application Service for Kubernetes.
Ensure you have a Kubernetes cluster created with the following characteristics:
- The PKS version should be v1.6 or v1.7.
- The Kubernetes cluster should have at least 5 worker nodes.
- Each worker node should have at least 2 CPU and 7.5 GB of memory available for allocation.
- The worker nodes in the Kubernetes cluster should trust the container image registry that Tanzu Application Service for Kubernetes will use to store buildpack-based app images. If the registry has a certificate issued from a private certificate authority (CA), this typically entails configuring the worker nodes in the Kubernetes cluster to trust the certificate of that CA.
See the Creating Clusters topic for information about creating a cluster with Enterprise PKS.
After creating the cluster, run
pks get-credentials CLUSTER-NAME to ensure that
kubectl targets the cluster.
Tanzu Application Service for Kubernetes requires the Kubernetes cluster to provide persistent volumes for its internal Postgres database and Minio blobstore. To enable dynamic provisioning of persistent volumes on a PKS-provisioned Kubernetes cluster on vSphere, you must install a default StorageClass in the Kubernetes cluster. See the Provision Dynamic PVs for Use with Enterprise PKS section of the Configuring and Using PersistentVolumes topic for more information.
To check whether your Kubernetes cluster already has a default storage class installed:
Retrieve the list of StorageClass resources in the cluster:
$ kubectl get storageclass
$ kubectl get storageclass NAME PROVISIONER AGE thin (default) kubernetes.io/vsphere-volume 34h
If the list includes an entry for which
(default)follows the storage class name, then the Kubernetes cluster has a default storage class installed already, and you are ready to provision volumes dynamically.
If the list does not include a default, you must install one before deploying Tanzu Application Service for Kubernetes. For your convenience, the Tanzu Application Service for Kubernetes installation bundle provides a vSphere provisioner storage class for you to install:
Ensure that you have the Tanzu Application Service for Kubernetes installation bundle downloaded and extracted to your local workstation.
Ensure that you have installed the
Change to the
tanzu-application-servicedirectory in your terminal.
Run the following command to install the storage class:
$ kapp deploy -a default-storage-class -f config-optional/vsphere-default-storage-class.yaml
Once you have completed the preparatory steps above, proceed to configure Tanzu Application Service for Kubernetes for installation to the Kubernetes cluster.