Before you can install Tanzu packages to a cluster, you need to add the package repository from which the cluster downloads the package images.
Tanzu Standard package repository, 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.
Prerequisites
Before you can install Tanzu packages to a workload cluster, you need to:
- Install the Carvel imgpkg tool on your workstation.
- (vSphere 7) Install the Kapp Controller in the target cluster.
- Add a package repository to the target cluster.
To add the package repository to a TKG workload cluster:
- Log in to the target cluster with both the Tanzu CLI and Kubectl.
2. List the repository versions:
imgpkg tag list -i projects.registry.vmware.com/tkg/packages/standard/repo
This command returns the available TKG package repository versions, for example:
3. Add the package repository as follows, depending on your TKG deployment option:
- Supervisor:
- Create a packagerepo.yaml specification file that references the target repository version.
apiVersion: packaging.carvel.dev/v1alpha1
kind: PackageRepository
metadata:
name: tanzu-standard
namespace: tkg-system
spec:
fetch:
imgpkgBundle:
image: projects.registry.vmware.com/tkg/packages/standard/repo:v2.2.0_update.2 - Install the package repository on the TKG cluster:
kubectl apply -f packagerepo.yaml
- Create a packagerepo.yaml specification file that references the target repository version.
- Standalone management cluster: Run the tanzu package repository add command
tanzu package repository add REPOSITORY-NAME --url REPOSITORY-URL -n REPOSITORY-NAMESPACE
Use Tanzu CLI or Kubectl commands to confirm that the repository object is created:
tanzu package repository list -A
kubectl get packagerepositories -A
Use Tanzu CLI or Kubectl commands to list the packages in the repository:
tanzu package repository list -A
kubectl -n tkg-system get packages
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.
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.
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 |
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 of 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.
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+ |
Reference: Prepare to Install Tanzu Packages