Prepare to Install Tanzu Packages

This topic explains how to prepare Tanzu Kubernetes Grid (TKG) workload clusters before installing Tanzu packages on them. Tanzu packages are packaged services that extend workload cluster functionality.

Before you can install Tanzu packages to a workload cluster, you need to:

  1. Install the Carvel imgpkg tool on your workstation.
  2. (vSphere 7) Install the Kapp Controller in the target cluster as described in Install Kapp Controller Using Kubectl (vSphere 7 TKr only).
  3. Add a package repository to the target cluster.

The sections below describe these steps.


Before preparing to install Tanzu packages to a workload cluster as described below, you need:

Install Carvel imgpkg

The Carvel imgpkg command ( lets you browse package repositories.

To install Carvel imgpkg:

  1. Install imgpkg.

    wget -O- >
    sudo bash
  2. Verify installation:

    imgpkg version
    imgpkg version 0.37.1

Add the Package Repository to the Cluster

Before you can install Tanzu packages to a cluster, you need to add the package repository from which the cluster downloads the package images.

The commands below refer to the Tanzu Standard package repository, which is distributed by VMware and contains the packages described in this publication. The Tanzu Standard repository is public, so you do not need to log in.

To add the package repository to a TKG workload cluster:

  1. Log in to the target cluster with both the Tanzu CLI and Kubectl.

  2. List the repository versions:

    imgpkg tag list -i

    This command returns the available TKG package repository versions, for example:

    25 tags

    The latest package repository for TKG 2.2 is v2.2.0_update.2. This is the version to use for TKG 2.2, assuming your environment meets the requirements. See Supervisor Version Requirements.

  3. Add the package repository as follows, depending on your TKG deployment option:

    • Supervisor:

      1. Create a packagerepo.yaml specification file that references the target repository version.

        kind: PackageRepository
          name: tanzu-standard
          namespace: tkg-system
      2. Install the package repository on the TKG cluster:

        kubectl apply -f packagerepo.yaml
    • Standalone management cluster: Run the tanzu package repository add command as described in Add a Package Repository.

  4. Use Tanzu CLI or Kubectl commands to confirm that the repository object is created:

    tanzu package repository list -A
    NAMESPACE   NAME            SOURCE                                                                           STATUS
    tkg-system  tanzu-standard  (imgpkg) Reconcile succeeded
    kubectl get packagerepositories -A
    tkg-system   tanzu-standard   24s   Reconcile succeeded
  5. Use Tanzu CLI or Kubectl commands to list the packages in the repository:

    tanzu package repository list -A
    kubectl -n tkg-system get packages

    This kubectl command returns a list of all available packages and their versions in the repository by querying the packages CRD. Refer to this list to determine which package versions you want to install.

    kubectl -n tkg-system get packages
    NAME                                                                 PACKAGEMETADATA NAME                           VERSION                 AGE                           1.1.0+vmware.1-tkg.2    4h39m13s                           1.1.0+vmware.2-tkg.1    4h39m13s
    ---                                    1.17.1+vmware.1-tkg.1   4h39m12s                                    1.17.2+vmware.1-tkg.2   4h39m12s

Storage Requirements for Tanzu Packages

The TKG workload cluster where you deploy a Tanzu package should be provisioned with a default storage class. Specifically, the Prometheus and Grafana packages require a default storage class.

For Supervisor-deployed clusters provisioned without the default storage class, you can patch the existing storage class and add the required annotation to specify it as default. See Patching a Storage Class.

For Supervisor-deployed clusters, the storage limit for the vSphere namespace that contains the target workload cluster must be larger than the total persistent volume claim size. For more information on vSphere namespace storage quota, see Configuring vSphere Namespaces for TKG Clusters on Supervisor.

Component Tanzu Package Default Storage Size
Grafana Grafana 8 Gi
Prometheus Server Prometheus 8 Gi
Alertmanager Prometheus 8 Gi
Harbor Harbor Registry Varies by PVC

To adjust the storage limit for the vSphere Namespace where the TKG cluster is provisioned:

  1. Using the vSphere Client, log in to the vCenter Server where vSphere with Tanzu is enabled.
  2. Select the vSphere Namespace where the target Tanzu Kubernetes cluster is provisioned.
  3. Select Configure > Resource Limits.
  4. Click Edit.
  5. Adjust the Storage limit so that it is larger than the total size of the persistent volume claims required for the Prometheus and Grafana extensions.

Supervisor Version Requirements

The TKG package repository is versioned. The table below maps the version of the repository to a particular vSphere with Tanzu release for Kubectl installations.

With vSphere 8, installing TKG Packages is simplified by the package-based TKR, which includes the Carvel packaging system and Kapp Controller. Both components are automatically managed as part the TKR image on which TKG 2.x nodes are based.

If you are installing packages on a vSphere 7 U3 instance of vSphere with Tanzu, you must first install Kapp Controller. See Install Kapp Controller Using Kubectl (vSphere 7 TKR only).

Refer to the TKR Release Notes for TKR compatibility with vSphere.

Package Repository Version vSphere Version Supervisor Version TKR Version
v2.2.x vSphere 8 U1c 1.25 vSphere 8 TKR 1.25
v2.1.x vSphere 8 U1 1.24 vSphere 8 TKR 1.24
v1.6.x vSphere 8 1.23 vSphere 8 TKR 1.23
v1.6.x vSphere 7 U3 1.21+ vSphere 7 TKR 1.21+

Next Step

Proceed with installing the Tanzu Packages, starting with Cert Manager. See Install Cert Manager for Certificate Management.

check-circle-line exclamation-circle-line close-line
Scroll to top icon