With the Tanzu CLI, you can efficiently install and manage packages for your Tanzu Kubernetes Grid (TKG) workload clusters. This section will guide you through the process of installing and managing packages with the Tanzu CLI, along with the package repositories where they are published.
Installing a package on a workload cluster created by Tanzu Kubernetes Grid adds functionality to the cluster. This functionality typically provides services to the workloads that the cluster hosts.
Tanzu Kubernetes Grid includes the following types of packages:
- Auto-managed packages. These packages are installed and upgraded automatically by Tanzu Kubernetes Grid.
- CLI-managed packages. These packages are installed and upgraded explicitly by using the Tanzu CLI. Located in the tanzu-standard package repository or in other repositories that you add to your clusters.
Tanzu Standard Repository Contents
In most cases, when you install a CLI-managed package from the tanzu-standard package repository, you install it in a workload or a shared services cluster.
If the package depends on other packages in the package repository, you must install them first.
Package | Function | Dependencies | Installation location |
cert-manager | Certificate management | n/a | Workload or shared services cluster |
contour | Container networking | Requires cert-manager | Workload or shared services cluster |
external-dns | Container registry | Requires cert-manager | Workload or shared services cluster |
fluent-bit | Log forwarding | n/a | Workload cluster |
flux-source-controller | Continuous delivery (CD) | n/a | Workload cluster |
grafana | Monitoring | Requires cert-manager, contour, and prometheus | Workload cluster |
harbor | Image registry | Requires cert-manager Requires contour or NSX ALB for ingress Recommends external-dns on infrastructure platforms with load balancing such as AWS, Azure, and vSphere with NSX Advanced Load Balancer, especially in production or other environments in which Harbor availability is important | Workload or shared services cluster |
helm-controller | Continuous delivery (CD) | Requires flux-source-controller | Workload cluster |
kustomize-controller | Continuous delivery (CD) | Requires flux-source-controller | Workload cluster |
multus-cni | Container networking | Requires cert-manager | Workload cluster |
prometheus | Monitoring | Requires cert-manager | Workload cluster |
whereabouts | Container networking | Requires multus-cni | Workload cluster |
Preparing to Install CLI-Managed Packages:
- Install the Tanzu CLI.
- Add the tanzu-standard package repository. If you are targeting a plan-based cluster (legacy), skip this step. For plan-based clusters, the tanzu-standard package repository is automatically enabled in every cluster, in the tanzu-package-repo-global namespace.
Package Repositories
Add a Package Repository
tanzu package repository add REPOSITORY-NAME --url REPOSITORY-URL -n REPOSITORY-NAMESPACE
Where:
- REPOSITORY-NAME is a name you choose for the package repository.
- REPOSITORY-URL is the OCI registry URL of the package repository.
- TKG 2.3 URL: projects.registry.vmware.com/tkg/packages/standard/repo:v2023.7.13
- TKG 2.2 URL: projects.registry.vmware.com/tkg/packages/standard/repo:v2.2.0
- TKG 2.1 URL: projects.registry.vmware.com/tkg/packages/standard/repo:v2.1.1
- This URL cannot be under projects.registry.vmware.com/tce.
- REPOSITORY-NAMESPACE is the target namespace for the package repository. If this option is not specified, the Tanzu CLI adds the package repository to the default namespace.
List Package Repositories
tanzu package repository list -A
Get the Details of a Package Repository
tanzu package repository get REPOSITORY-NAME -n REPOSITORY-NAMESPACE
Update a Package Repository
tanzu package repository update REPOSITORY-NAME --url REPOSITORY-URL -n REPOSITORY-NAMESPACE
Delete a Package Repository
tanzu package repository delete REPOSITORY-NAME -n REPOSITORY-NAMESPACE
Packages
List Available Packages
tanzu package available list -A
List available package versions
tanzu package available list AVAILABLE-PACKAGE-NAME -A
Get the Details of an Available Package
tanzu package available get AVAILABLE-PACKAGE-NAME -n AVAILABLE-PACKAGE-NAMESPACE
List Installed Packages
tanzu package installed list -A
Get the Details of an Installed Package
tanzu package installed get INSTALLED-PACKAGE-NAME -n INSTALLED-PACKAGE-NAMESPACE
Save the current configuration of an installed package
tanzu package installed get INSTALLED-PACKAGE-NAME -n INSTALLED-PACKAGE-NAMESPACE --values-file-output FILE-PATH
Install a Package
tanzu package install PACKAGE-NAME -p AVAILABLE-PACKAGE-NAME -v AVAILABLE-PACKAGE-VERSION --values-file PACKAGE-CONFIGURATION-FILE -n TARGET-NAMESPACE
Update a Package
tanzu package installed update INSTALLED-PACKAGE-NAME -v TARGET-PACKAGE-VERSION --values-file PACKAGE-CONFIGURATION-FILE -n INSTALLED-PACKAGE-NAMESPACE
Delete a Package
tanzu package installed delete INSTALLED-PACKAGE-NAME -n INSTALLED-PACKAGE-NAMESPACE
Notes:
- The tanzu package CLI plugin is intended only for CLI-managed packages. Do not use the commands provided in this topic to install and manage auto-managed packages. Their lifecycle is managed automatically by Tanzu Kubernetes Grid.
- Do not install packages to any tanzu-system- namespace.
- VMware supports the packages listed above when deployed to TKG clusters. Custom package configurations, modifications, and updates for non-TKG clusters is not supported.
- vSphere with Tanzu does not support deploying packages to a shared services cluster. Workload clusters deployed by vSphere with Tanzu can only use packaged services deployed to the workload clusters themselves.
- You can run different versions of the CLI-managed packages in different workload clusters. In a workload cluster, you can run either the latest supported version of a CLI-managed package or the versions that are released with the last two TKG releases. For example, if the latest supported version of Contour is v1.24.4 and the last two TKG releases had the Contour versions 1.23.5 and v1.22.3, you can run version v1.24.4, v1.23.5, or v1.22.3 of Contour in a workload cluster.
- You install package repositories and packages to the namespace of your choice. If you do not set the –namespace option, the Tanzu CLI targets the default namespace.
Reference: Install and Manage Packages