On Tanzu Platform for Kubernetes, cluster groups are used to logically group Kubernetes clusters, allowing you to apply configurations broadly to all clusters in the group.
NoteMake sure that the name of the cluster group is unique in the project and does not match to the name of any Space in the project. Creating a Space and cluster group with the same name in a Project results in only cluster group roles being available when setting up access control policies for Spaces. You will not be able to set up access control polices with role bindings for Spaces.
By default, each Project created within the Tanzu Platform for Kubernetes includes a Run cluster group that has the necessary Capabilities applied to support application environments. However, you might need to create additional Run cluster groups.
This topic provides the steps to create a cluster group that is enabled for Tanzu Application Engine and add the capabilities for a run environment.
run-cluster-group
.Enable the Tanzu Application Engine toggle.
Click Create.
From a CR file
Save the following to a YAML file, for example, cluster_group.yaml
.
# cluster_group.yaml
type:
kind: ClusterGroup
package: vmware.tanzu.manage.v1alpha1.clustergroup
version: v1alpha1
fullName:
name: "run-cluster-group"
meta:
description: "testing creation of a TAE-enabled cluster group"
spec:
integrations:
- TANZU_APPLICATION_ENGINE # TAE-enabled
Use the resource file to create cluster group with Tanzu Application Engine enabled.
tanzu operations clustergroup create -f cluster_group.yaml
From a template file
Save the following to a template file, for example, data.txt
.
# data.txt
Name: run-cluster-group
Integrations: TANZU_APPLICATION_ENGINE
Create a cluster group from the data values file.
tanzu operations clustergroup create -v data.txt
Adding capabilities to the cluster group automatically adds the capabilities to the clusters in the group. The following example adds the Observability capability.
From the ellipsis next to the capability name, select Install.
Select the cluster group you created in Create a cluster group for run environments.
NoteWhen you add a Capability to a cluster group in Tanzu Platform hub, the Capability is pinned to a specific version of the packages that make up the Capability. When new versions of the Capabilities are released with Tanzu Platform for Kubernetes updates, the packages for the Capability fail to reconcile, which causes Spaces to not be scheduled. For a workaround, see Removing pinned Capability version for custom cluster groups.
Set the cluster group on which to install the packages that provide the capability.
View the list of available cluster groups.
tanzu operations clustergroup list
Select the cluster group created in Create a cluster group for run environments.
tanzu operations clustergroup use <clustergroup-name>
Install the package for Observability.
Verify the package version.
tanzu package available list --summary=false | grep observability.tanzu.vmware.com
The output is similar to the following:
observability.tanzu.vmware.com 1.0.3 2024-03-04 11:52:46 +0530 IST
Install the package.
tanzu package install observability -p observability.tanzu.vmware.com -v 1.0.3
The output is similar to the following:
12:49:49PM: Creating package install resource
Verify that the package is installed.
tanzu package installed list
The output is similar to the following:
NAME PACKAGE-NAME PACKAGE-VERSION STATUS MESSAGE
observability observability.tanzu.vmware.com 1.0.3 Reconcile succeeded [succeeded: 3, failed: 0, reconciling: 0]
Get the package details, run the following commands:
For the Observability package:
tanzu package installed get observability
The output is similar to the following:
NAMESPACE: default
NAME: observability
PACKAGE-NAME: observability.tanzu.vmware.com
PACKAGE-VERSION: 1.0.3
STATUS: Reconcile succeeded
CONDITIONS: - message: '[succeeded: 1, failed: 0, reconciling: 0]'
reason: ReconcileSucceeded
status: "True"
type: ReconcileSucceeded