This section describes how to install and configure packages in Tanzu Kubernetes Grid.
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.
Tanzu Kubernetes Grid includes the following types of packages:
tanzu-corepackage repository. See the Auto-Managed Packages section below.
tanzu-standardpackage repository or in other repositories that you add to your clusters. See the CLI-Managed Packages section below.
tanzu-core and the
tanzu-standard package repositories are automatically enabled in every cluster.
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.
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.
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.
To make packages available in Kubernetes clusters, Tanzu Kubernetes Grid creates the following API resources in the target cluster:
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
PackageMetadataresources. After a
PackageRepositoryis created in your target cluster,
kapp-controllercan install any of the packages that the package repository contains.
pkg, contains version-specific information about a given package and defines how to install the package.
Packageresource when installing the package.
pkgm, contains version-agnostic information about a given package.
pkgi, represents an installed package in your target cluster. It also references the
Packageresource 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.