Install and Configure Packages

This section describes how to install and configure packages in Tanzu Kubernetes Grid.

Packages

Installing a package on a workload cluster created by Tanzu Kubernetes Grid adds a functionality to the cluster. This functionality typically provides services to the workloads that the cluster hosts. For example, the Antrea package provides the Antrea container network interface (CNI), the Contour package ingress control services, the Harbor package a private container registry, and so on. Some packages support the operation of the cluster itself.

Internally, a package consists of configuration metadata and image references that inform the package manager what software the package contains and how to install it into a Kubernetes cluster. Packages are grouped into package repositories. Some packages are enabled in clusters automatically while others are installed explicitly by using the Tanzu CLI. For more information about how packages and package repositories are implemented in Tanzu Kubernetes Grid, see Carvel API Resources below.

Types of Packages

Tanzu Kubernetes Grid includes the following types of packages:

  • Auto-managed packages. These packages are installed and upgraded automatically by Tanzu Kubernetes Grid. Located in the tanzu-core package repository. See the Auto-Managed Packages section below.
  • 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. See the CLI-Managed Packages section below.

Both the tanzu-core and the tanzu-standard package repositories are automatically enabled in every cluster.

Auto-Managed Packages

These packages are typically required for basic cluster functionality. Tanzu Kubernetes Grid installs and upgrades them automatically when you create and upgrade a Kubernetes cluster. You can manually update the configuration of some of the auto-managed packages after you create or upgrade the cluster. For more information, see the Auto-Managed Packages topic.

Note: The tanzu package CLI plugin is intended only for CLI-managed packages. Do not use the tanzu package CLI plugin to install and manage auto-managed packages in the tanzu-core package repository or to manage the tanzu-core package repository itself. Their lifecycle is managed by Tanzu Kubernetes Grid.

CLI-Managed Packages

These packages extend Kubernetes clusters created by Tanzu Kubernetes Grid. After creating a cluster, you can install packages from the tanzu-standard package repository or from package repositories that you add to the cluster. Tanzu Kubernetes Grid manages the lifecycle of the tanzu-standard package repository. For more information about these packages, see the CLI-Managed Packages topic. For information about how to create your own packages and package repositories, see Tutorial: Create and Install a Package in the Carvel documentation.

Note: To install packages into a workload cluster created by using vSphere with Tanzu, you must first install kapp-controller into the cluster as described in Prepare a Workload Cluster Created by Using vSphere with Tanzu to Run Packages.

Carvel API Resources

To make packages available in Kubernetes clusters, Tanzu Kubernetes Grid creates the following API resources in the target cluster:

  • PackageRepository, or pkgr, represents a single package repository. It points kapp-controller, a package manager, to the package repository that is defined in the resource. A package repository contains Package and PackageMetadata resources. After a PackageRepository is created in your target cluster, kapp-controller can install any of the packages that the package repository contains.
  • Package, or pkg, contains version-specific information about a given package and defines how to install the package. kapp-controller uses the Package resource when installing the package.
  • PackageMetadata, or pkgm, contains version-agnostic information about a given package.
  • PackageInstall, or pkgi, represents an installed package in your target cluster. It also references the Package resource that was used to install the package.

You can list and view these resources by using the kubectl api-resources and kubectl get commands. For more information about the Carvel API resources, see Packaging in the Carvel documentation.

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