Refer to the example YAML to provision a TanzuKubernetesCluster using the v1alpha3 API with a default storage class and custom settings for node volumes.

v1alpha3 Example: TKC with Node Volumes and Default Storage

The example YAML provisions a custom TanzuKubernetesCluster using the v1alpha3 API.

Note the following optional customizations in this example. Refer to the v1alpha3 API spec for details.
  • The cluster is provisioned with a default storage class, which is required by some tools such as workloads deployed by Helm and Tanzu Packages
  • Worker node volumes are declared for high-churn components such as containerd and kubelet
apiVersion: run.tanzu.vmware.com/v1alpha3
kind: TanzuKubernetesCluster
metadata:
  name: tkc-custom-storage
  namespace: tkg-cluster-ns
spec:
  topology:
    controlPlane:
      replicas: 3
      vmClass: guaranteed-medium
      storageClass: tkg-storage-policy
      tkr:
        reference:
          name: v1.25.7---vmware.3-fips.1-tkg.1
    nodePools:
    - replicas: 3
      name: worker-np
      vmClass: guaranteed-medium
      storageClass: tkg-storage-policy
      tkr:
        reference:
          name: v1.25.7---vmware.3-fips.1-tkg.1
      volumes:
      - name: containerd
        mountPath: /var/lib/containerd
        capacity:
          storage: 50Gi
      - name: kubelet
        mountPath: /var/lib/kubelet
        capacity:
          storage: 50Gi
  settings:
    storage:
      defaultClass: tkg-storage-policy