Create a cluster group for run environments

Cluster groups are used to logically group Kubernetes clusters allowing you to apply configurations to all clusters in the group. By default, each Project created within the Tanzu Platform for Kubernetes comes with a Run cluster group that has the appropriate capabilities applied to support application environments. However, you may need to create additional run cluster groups.

Overview of steps

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.

  1. Create a cluster group.
  2. Add capabilities to the cluster group.

Create a cluster group for run environments

UI-based steps
On the Tanzu Platform hub:
  1. Expand Infrastructure.
  2. Select Kubernetes Clusters.
  3. Select Cluster Groups > Create Cluster Group.
  4. Provide a name for the cluster group, for example, run-cluster-group.
  5. (Optional) Add a description.
  6. Enable the Tanzu Application Engine toggle.

    Create cluster group screen

  7. Click Create.
Tanzu CLI-based steps
Use Tanzu CLI commands to create the cluster group from a custom resource (CR) or from a template file.

From a CR file

  1. 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
    
  2. 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

  1. Save the following to a template file, for example, data.txt.

    # data.txt
    Name: run-cluster-group
    Integrations: TANZU_APPLICATION_ENGINE
    
  2. Create a cluster group from the data values file.

    tanzu operations clustergroup create -v data.txt
    

Add capabilities to the cluster group for your run environments

Adding capabilities to the cluster group automatically adds the capabilities to the clusters in the group. The following example adds the Observability capability.

UI-based steps
On the Tanzu Platform hub:
  1. Expand Application Spaces
  2. Select Capabilities > Available and locate the Observability capability.
  3. From the ellipsis next to the capability name, select Install. Install Run Package
  4. Select the cluster group you created in Create a cluster group for run environments.
  5. Click Install Package.
Note

When you add a Capability to a cluster group on 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.

Tanzu CLI-based steps
Use Tanzu CLI commands to install packages in the cluster group.
  1. Set the cluster group on which to install the packages that provide the capability.

    1. View the list of available cluster groups.

      tanzu operations clustergroup list
      
    2. Select the cluster group created in Create a cluster group for run environments.

      tanzu operations clustergroup use <clustergroup-name>
      
  2. Install the package for Observability.

    1. 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
      
    2. 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
      
  3. 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]
    
    
  4. 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
    
check-circle-line exclamation-circle-line close-line
Scroll to top icon