As a cluster administrator, you can use Tanzu Mission Control to add a kustomization to a cluster or cluster group that has continuous delivery enabled on it.

A kustomization is a file or set of files that declaratively describes a set of Kubernetes configurations. For more information, see Declarative Management of Kubernetes Objects Using Kustomize in the Kubernetes documentation.

Prerequisites

Log in to the Tanzu Mission Control console, as described in Log In to the Tanzu Mission Control Console.

Make sure you have the appropriate permissions to add a kustomization.
  • To create a kustomization, you must be associated with the cluster.admin or clustergroup.admin role.

Make sure you have already enabled continuous delivery for the cluster, as described in Enable Continuous Delivery for a Cluster or Cluster Group,and defined a Git repository, as described in Add a Git Repository to a Cluster or Cluster Group.

For Tanzu Kubernetes Grid Service clusters running in vSphere with Tanzu that have pod security policies, make sure you have the appropriate role bindings on the workload cluster. Without the appropriate permissions, kustomizations can fail to be deployed. For information about creating role bindings, see Example Role Bindings for Pod Security Policy in the vSphere with Tanzu Configuration and Management documentation.

Procedure

  1. Navigate to the detail page for the cluster or cluster group to which you want to add a kustomization.
  2. Click the Add-ons tab.
  3. In the Add-ons menu click Kustomizations in the Continuous Delivery section.
  4. Click Add kustomization.
  5. On the Add kustomization page, enter a name for the kustomization.
  6. You can optionally provide a description for the kustomization.
  7. Select the Git repository you want to use for the kustomization.
  8. Specify the path of the kustomization from the root of the Git repository to the folder containing the kustomization file.
  9. You can optionally expand the Advanced settings section to specify more options.
    1. Specify a target namespace.
      The target namespace indicates the namespace for objects that are created as part of the kustomization.
      If you specify a target namespace, that namespace must already exist on the cluster or it must be defined in a manifest included in the kustomization. If it does not exist, applying the kustomization fails.
      • If you defined a target namespace in a manifest and also specify one in TMC, then the value defined in the manifest takes precedence.
      • If you did not define a target namespace in a manifest and you do not specify one in TMC, then the kustomization is added to the default namespace.
    2. Click to toggle Prune on or off.
      If you configure the kustomization to prune (toggled on), the resources on the cluster that were created through this kustomization are deleted when the kustomization is removed from the cluster. Resources created before prune is enabled are not deleted when the kustomization is removed.
  10. After you finish configuring the kustomization, click Add kustomization.