Simplified and Cost-Efficient GKE Node Management with NAP:
Secure your spot!
LogoLogo
PerfectScale.ioStart for FreeYour Account
  • Kubernetes Optimization
  • Getting started
    • How to onboard a cluster
    • Onboarding clusters programmatically
    • Onboarding with ArgoCD
    • Updating PerfectScale Agent resources
    • Re-onboarding a cluster
  • Enable automation
    • Automation setup instruction
    • Including a cluster, namespace or workload to the Automation
      • Configuring Automation for a cluster
      • Configuring Automation for a namespace
      • Configuring Automation for a workload
    • Excluding a namespace or workload from the Automation
    • Automation customization
    • Verifying Automation status
    • Exploring Automation KPIs
    • Self-healing mechanism for unschedulable pods
    • Disable automation
    • Troubleshooting
    • Automation with GitOps
  • Cloud billing integration
    • Connecting AWS CUR
    • Connecting Azure Cost Management
  • Clusters' metrics overview
  • Podfit | vertical pod right-sizing
    • Understanding 'At Risk' indicators
    • LimitRange and ResourceQuota
  • Infrafit | node right-sizing
  • Configure alerts
    • Alerts acknowledgement
  • Trends monitoring
  • Revisions history log
  • Product overview
    • How to monitor PerfectScale Agent
    • PerfectScale data collected
    • PerfectScale Autoscaler Objects' Events
    • Outbound Request Ports used by the Exporter and Autoscaler
    • PerfectScale Weekly Report
    • Product architecture
  • Customizations
    • Alerting
      • Resiliency alerts
      • Financial alerts
    • Pricing
      • Custom Pricing configuration
      • AWS CUR configuration
      • Azure Cost Management configuration
    • Ticketing & Bug Tracking
    • Communication & Messaging
      • Slack Integration
        • How to configure slack_token
        • How to configure routings
      • MS Teams Integration
        • How to configure teams_webhook
      • Datadog Alerts Integration
    • Label customizations
    • Grouping
    • Observability
    • Podfit labels
    • Optimization Policy customization
  • Administration
    • Cluster settings
    • User management
    • Roles and permissions
    • Subscription details
    • Help Center
  • PerfectScale trial
    • How to find your allocated vCPU?
  • PerfectScale Prometheus Exporter
  • Security
    • MFA
    • SSO
    • ps-agent RBAC Permissions
    • psc-autoscaler RBAC Permissions
    • ps-exporter via Proxy Configuration
  • Public API
  • Help PerfectScale to improve
  • Go to your account
Powered by GitBook
LogoLogo

© PerfectScale 2025

On this page
  • How to create Grouping Profile
  • Grouping Profile configuration
  • Grouping of short-living workloads
  • Custom Grouping Preview
  • Auto-Generated Profiles
  • How to apply Grouping Profile
  1. Customizations

Grouping

Leverage advanced PerfectScale grouping to streamline your optimization process even for highly dynamic environments

PreviousLabel customizationsNextObservability

Last updated 1 month ago

The PerfectScale grouping configuration stands as a powerful tool, facilitating the aggregation of data pertaining to redundant workloads exhibiting similar patterns. By preventing overload through batches of identical information, it enables you to focus on what matters, thereby streamlining analysis processes.

Custom grouping is an aggregation rule that aggregates multiple workloads into a single entity (for example, all GitLab runners are aggregated into a single entity—the GitLab workload), merging their data (resource usage, limits, requests, etc.).

This feature is especially convenient when using Spark, GitLab, or any other operators that produce short-living small workloads that often reflect just a single pod in the cluster.

From the Settings tab

Go to the Settings tab on the left panel -> select Grouping -> click the +Add Profile button -> name the profile and put the needed values in the relevant fields -> click Save button.

From the Overview tab

Go to the Overview tab on the left panel -> find the cluster to which you want to apply the Grouping Profile and click gear button -> go to Customizations -> click on Add New Profile in the Custom Grouping Profile drop-down list -> name and configure your profile -> click the Save And Apply button -> click the Save Changes button.

Grouping Profile configuration

custom_grouping:
  - name: spark-driver
    filter:
      priority: 10
      owner_type: SparkApplication
      namespace: default
      pp
      pod_regex: 'spark-job-.*'
      namespace_regex: "namespace1-.*"
      containers_exist: "prometheus-server"
    target_workload:
      workload_name:
        static_value: 'grouped-spark-job'
      workload_type:
        static_value: GroupedSparkApplication
    container_grouping:
      - name: ps-container
        container_filter:
          container_regex: ps-.*
        target_container:
          container_name:
            static_value: grouped-ps-container

Here is the list of configurable grouping fields:

name - the group name of the aggregated workloads

filter - a set of conditions that define to which workloads the grouping will be applied. The workloads that meet the conditions will be assigned to a group:

  • priority - (optional) indicates the filter's priority. This is particularly helpful when multiple filters match the workload.

  • owner_type - (case sensitive) the equivalent of Type in Podfit.

  • namespace - (case sensitive) checks if the workload belongs to the particular namespace

  • pod_regex - a regular expression identifies the workload by its name (for example: loki-.* searches for the workloads with names start with loki- and then have at least one more symbol).

  • containers_exists - checks if workload holds the list of the containers described in this filter.

target_workload - a meta workload represents the group of workloads matched by the filter.

  • workload_name - (mandatory) the name of the grouped workload to which workloads will be grouped.

  • workload_type - (mandatory) the type of the grouped workload to which workloads will be grouped.

  • workload_namespace - (optional) the namespace of the grouped workload to which workloads will be grouped.

:

  • label_value - a value of the given label key for this workload example: label_value: "label_app"

  • static_value - a constant string example: static_value: "GroupedWorkload"

  • labels_template - a combination of the static_value and label_value(also works for multiple label values) example: labels_template: grouped-{label_app}

container_grouping - an array of profiles for container grouping for the workload Custom Grouping entry. This is particularly helpful when the container names are auto-generated.

  • container_filter - a set of conditions that define to which containers the grouping will be applied (supports only regexes).

    • container_regex - a regular expression identifies the container by its name.

  • target_container - the container in which containers will be grouped by the entry.

Only static_value is supported for the target_contaier.

Grouping of short-living workloads

You can seamlessly group short-lived workloads into a single entity using a grouping profile, which helps eliminate unnecessary clutter. This feature is particularly helpful when managing many short-lived workloads, allowing you to focus on the most important aspects. By grouping them, you can highlight the most relevant data, helping you prioritize actions and optimize your cluster more effectively.

To group short-living workloads, use the following configuration:

short_living_grouping:
  - name: default
    filter:
      namespace: ''
      label_exists: ''
      owner_type: ''
      pod_regex: ''
      namespace_regex: ''
      priority: 0
      containers_exist: ''
      type: ''
      workload_type: ''
    older_than: 240h0m0s
    running_time_less_than: 10m0s
    target_workload:
      workload_name:
        label_value: ''
        static_value: __grouped__
        labels_template: ''
      workload_type:
        label_value: ''
        static_value: __grouped__
        labels_template: ''
      workload_namespace:
        label_value: ''
        static_value: __grouped__
        labels_template: ''
custom_grouping: []

workload_name and workload_type in target_workload are mandatory fields, while workload_namespace is optional.

Custom Grouping Preview

The Custom Grouping Preview feature allows you to quickly evaluate how the cluster will look after re-aggregation with the applied profile.

Click the Custom Grouping Preview button to navigate directly to the preview screen.

  1. Select the cluster that you want to group with the Grouping Profile. Get an estimated number of workloads, namespaces, and clusters after the grouping is applied.

  2. Choose to which data, whether aggregated or raw, you want to apply the Grouping profile along with the desired timeframe.

  3. Filter workloads by column values in the workloads table and view the number of workloads in each group.

Auto-Generated Profiles

PerfectScale can auto-generate the Grouping profile with a single click.

We recommend you check and validate the auto-generated profiles before applying them to a cluster.

To auto-generate a Grouping Profile, go to the Overview tab on the left panel -> find the cluster to which you want to apply the Grouping Profile and click three dots button -> select Cluster Settings -> go to Customizations -> click Auto-Generate Profile-> name the profile and click Save button.

Apply to a single cluster

To apply Grouping Profile to the cluster, go to the Overview tab on the left panel -> find the cluster to which you want to apply the Grouping Profile and click gear button -> go to Customizations -> select the needed profile in the Custom Grouping Profile drop-down list.

Apply to multiple clusters

To apply the profile to multiple clusters from a single view, use the Manage Assignments feature.

Go to the Settings tab on the left panel -> select the Grouping -> click the Manage Assignments button -> apply the profiles for the needed clusters -> click the Save Changes button.

How to create Grouping Profile

There are two options for creating a Profile: tab or directly .

label_exists - checks if the specific key is attached to the workloads (single key or comma-separated list of keys). NOTE: label keys should be provided in the Prometheus format. Example: Kubernetes: app.kubernetes.io/instance Prometheus: label_app_kubernetes_io_instance

namespace_regex - a regular expression identifies the namespace by its name. NOTE: namespace_regex should be paired with some other filter condition.

Use Set as default checkbox to automatically assign the profile to the clusters. NOTE: The manually assigned profile takes priority over the default one.

How to apply Grouping Profile

🛠️
💡
💡
💡
🛠️
from the Settings
from the Overview
Grouping profie
Grouping profile from settings
Grouping profile from overview
Custom grouping preview
Custom grouping preview screen
Auto-generated grouping profile
Applying grouping profile to a single cluster
Applying grouping profile to multiple clusters