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
  • Including a cluster to the Automation
  • Configuration with additional parameters
  1. Enable automation
  2. Including a cluster, namespace or workload to the Automation

Configuring Automation for a cluster

Learn how to apply Automation to all workloads within the cluster effortlessly

PreviousIncluding a cluster, namespace or workload to the AutomationNextConfiguring Automation for a namespace

Last updated 1 month ago

Cluster-level automation configuration allows the definition of global settings that apply to all workloads within the cluster.

You can effortlessly exclude specific namespaces and workloads from Automation. Learn more .

Including a cluster to the Automation

Configuration with additional parameters

The following cluster-level automation configuration example represents global automation settings that apply to all workloads with the type Deployment within the cluster. Additionally, there is a specified frequency of the automation actions and maintenance window, which gives you control over the automation and minimizes the impact of changes on business operations.

Uncover the full range of customization options, how to implement them and tailor Automation for your application's needs .

Create a YAML file with the cluster-level automation configuration using the following template:

apiVersion: perfectscale.io/v1
kind: ClusterAutomationConfig
metadata:
  name: cluster-automation-config
spec:
  automation:
    operational:
        stopAllAutomation: false # Global kill switch for automation (default: false)
        timeConstraints:
          wasteMaxAutomationFrequency: "30m" # Applies recommendations to decrease resources every 30 minutes
          fixResiliencyMaxAutomationFrequency: "30m" # Applies recommendations to increase resources every 30 minutes
          maintenanceWindow:
            monday:
              - "00:00-23:59"
            tuesday:
              - "00:00-23:59"
            wednesday:
              - "00:00-23:59"
            thursday:
              - "00:00-23:59"
            friday:
              - "00:00-23:59"
            saturday:
              - "00:00-23:59"
            sunday:
              - "00:00-23:59"
          maintenanceWindowIgnoredForResiliency: false # Indicates if the maintenance window constraints are ignored for resiliency
        restrictions:
          workloadMinWasteUSDPerMonth: 5 # Activates automation only if monthly waste exceeds a set threshold (for example, $5)
          cpuManagement:
            request:
              increaseEnabled: false # Doesn't allow PerfectScale Automation to increase CPU requests if the performance risks are observed
              decreaseEnabled: true # Allows PerfectScale Automation to decrease CPU requests to minimize waste
              minimumCores: -1 # If a recommendation falls below the value, the automation will implement the minimum instead
              maximumCores: -1 # If a recommendation falls above the value, the automation will implement the maximum instead
            limit:
              keepLimit: true # Automation will maintain a non-zero CPU limit and will not set the value to zero
          memoryManagement:
            request:
              increaseEnabled: false # Doesn't allow PerfectScale Automation to increase Memory requests if the performance risks are observed
              decreaseEnabled: true # Allows PerfectScale Automation to decrease Memory requests to minimize waste
              minimumGiB: -1 # If a recommendation falls below the value, the automation will implement the minimum instead
              maximumGiB: -1 # If a recommendation falls above the value, the automation will implement the maximum instead
            limit:
              increaseEnabled: false # Doesn't allow PerfectScale Automation to increase Memory limit if the performance risks are observed
              decreaseEnabled: false # Doesn't allow PerfectScale Automation to decrease Memory limit
              minimumGiB: -1 # If a recommendation falls below the value, the automation will implement the minimum instead
              maximumGiB: -1 # If a recommendation falls above the value, the automation will implement the maximum instead
              memoryLeakDetection:
                maxMemoryIncreaseIterations:
                  daily: 3 # Allows automation to increase memory limit up to 3 times per day
                  weekly: 6 # Allows automation to increase memory limit up to 6 times per week
    workloadTypes:
      Deployment:
        operational:
          automationMode: "Enabled" # Enables automation for the workloads with a specific type in the cluster/namespace
          timeConstraints:
            wasteMaxAutomationFrequency: "30m" # Applies recommendations to decrease resources every 30 minutes
            fixResiliencyMaxAutomationFrequency: "30m" # Applies recommendations to increase resources every 30 minutes
            maintenanceWindow:
              monday:
                - "00:00-23:59"
              tuesday:
                - "00:00-23:59"
              wednesday:
                - "00:00-23:59"
              thursday:
                - "00:00-23:59"
              friday:
                - "00:00-23:59"
              saturday:
                - "00:00-23:59"
              sunday:
                - "00:00-23:59"
            maintenanceWindowIgnoredForResiliency: false # Indicates if the maintenance window constraints are ignored for resiliency
          restrictions:
            workloadMinWasteUSDPerMonth: 5 # Activates automation only if monthly waste exceeds a set threshold (for example, $5)
            cpuManagement:
              request:
                increaseEnabled: false # Doesn't allow PerfectScale Automation to increase CPU requests if the performance risks are observed
                decreaseEnabled: true # Allows PerfectScale Automation to decrease CPU requests to minimize waste
                minimumCores: -1 # If a recommendation falls below the value, the automation will implement the minimum instead
                maximumCores: -1 # If a recommendation falls above the value, the automation will implement the maximum instead
              limit:
                keepLimit: true # Automation will maintain a non-zero CPU limit and will not set the value to zero
            memoryManagement:
              request:
                increaseEnabled: false # Doesn't allow PerfectScale Automation to increase Memory requests if the performance risks are observed
                decreaseEnabled: true # Allows PerfectScale Automation to decrease Memory requests to minimize waste
                minimumGiB: -1 # If a recommendation falls below the value, the automation will implement the minimum instead
                maximumGiB: -1 # If a recommendation falls above the value, the automation will implement the maximum instead
              limit:
                increaseEnabled: false # Doesn't allow PerfectScale Automation to increase Memory limit if the performance risks are observed
                decreaseEnabled: false # Doesn't allow PerfectScale Automation to decrease Memory limit
                minimumGiB: -1 # If a recommendation falls below the value, the automation will implement the minimum instead
                maximumGiB: -1 # If a recommendation falls above the value, the automation will implement the maximum instead
                memoryLeakDetection:
                  maxMemoryIncreaseIterations:
                    daily: 3 # Allows automation to increase memory limit up to 3 times per day
                    weekly: 6 # Allows automation to increase memory limit up to 6 times per week

Apply the created configuration by running the following command (where cluster-automation-config.yaml - the name of your file created in the previous step):

kubectl apply -f cluster-automation-config.yaml

Explore more about automation customization options .

here
here
here