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
  • Step 1: Install PerfectScale Automation Agent
  • Step 2: Create Custom Resource (CR)
  • Recommended adoption path
  • Combining cost-savings and performance improvement configuration
  1. Enable automation

Automation setup instruction

Set up PerfectScale Automation in minutes and start seeing instant optimization results with just a few simple steps

PreviousEnable automationNextIncluding a cluster, namespace or workload to the Automation

Last updated 1 month ago

Automation is currently available for workloads with type Deployment, DaemonSet, StatefulSet, CronJob and Job.

PerfectScale does not support automating workloads that use the OnDelete update strategy. The OnDelete strategy requires manual intervention to update pods, which falls outside the scope of PerfectScale's automated optimization capabilities.

Step 1: Install PerfectScale Automation Agent

Deploy the PerfectScale automation agent. In order to install the PerfectScale automation agent, run the following commands:

helm repo add perfectscale https://perfectscale-io.github.io --force-update

and

helm upgrade --install -n perfectscale psc-autoscaler \
      --set secret.create=false \
      perfectscale/psc-autoscaler

If taints and tolerations are defined in the node pool, you must include them in the command too, so it will appear like this:

helm upgrade --install -n perfectscale psc-autoscaler \
      --set tolerations[0].key=node_pool \
      --set tolerations[0].operator=Equal \
      --set tolerations[0].value=tooling \
      --set secret.create=false \
      perfectscale/psc-autoscaler

If you utilize CI/CD tools with auto-sync, ensure to review the additional configuration steps. Automation with GitOps

Follow the instructions provided, or if you encounter any issues.

Step 2: Create Custom Resource (CR)

After the installation of the automation agent, it is important to create a cluster automation configuration, as this step is mandatory:

apiVersion: perfectscale.io/v1
kind: ClusterAutomationConfig
metadata:
  name: cluster-automation-config
spec:
  automation:
    operational:
      stopAllAutomation: false # Global kill switch for automation (default: false)

Automation is only enabled in configurations where automationMode for the workload type is set to "Enabled". This can be configured in the ClusterAutomationConfig, NamespaceAutomationConfig, or WorkloadAutomationConfig.

Example:

apiVersion: perfectscale.io/v1
kind: ClusterAutomationConfig
metadata:
  name: cluster-automation-config
spec:
  automation:
    operational:
      stopAllAutomation: false # Global kill switch for automation (default: false)  
    workloadTypes:
      Deployment:
        operational:
          automationMode: "Enabled" # Enables automation for the workloads with a specific type in the cluster/namespace

Only one cluster-level automation configuration can be applied per cluster. To prevent errors, PerfectScale recommends using consistent naming for cluster-level configurations within the same cluster. This ensures that a new configuration will override the previous one without causing any conflicts.

To help you quickly start using PerfectScale Automation and streamline the optimization process, we provide pre-built Custom Resources (CRs) focused on desired optimization goals. You can easily implement the following CRs and customize them if needed.

To minimize waste and achieve optimal savings, we recommend starting with a simple, cluster-level automation focused on cost reduction.

Create a YAML file with the recommended 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)  
    workloadTypes:
      Deployment:
        operational:
          automationMode: "Enabled" # Enables automation for the workloads with a specific type in the cluster/namespace
          restrictions:
      DaemonSet:
        operational:
          automationMode: "Enabled" # Enables automation for the workloads with a specific type in the cluster/namespace
          restrictions:

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

Combining cost-savings and performance improvement configuration

The following example of a Cluster-level automation configuration allows you to automate the optimization of the entire cluster, enhancing its performance while maintaining optimal costs.

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)  
    workloadTypes:
      Deployment:
        operational:
          automationMode: "Enabled" # Enables automation for the workloads with a specific type in the cluster/namespace
          restrictions:
            workloadMinWasteUSDPerMonth: 5 # Activates automation only if monthly waste exceeds a set threshold (for example, $5)
            cpuManagement:
              request:
                increaseEnabled: true # Allows PerfectScale Automation to increase CPU requests if the performance risks are observed
                decreaseEnabled: true # Allows PerfectScale Automation to decrease CPU requests to minimize waste
              limit:
                keepLimit: false # Automation will maintain a non-zero CPU limit and will not set the value to zero
            memoryManagement:
              request:
                increaseEnabled: true # Allows PerfectScale Automation to increase Memory requests if the performance risks are observed
                decreaseEnabled: true # Allows PerfectScale Automation to decrease Memory requests to minimize waste
              limit:
                increaseEnabled: true # Allows PerfectScale Automation to increase Memory limit if the performance risks are observed
                decreaseEnabled: true # Allows PerfectScale Automation to decrease Memory limit
      DaemonSet:
        operational:
          automationMode: "Enabled" # Enables automation for the workloads with a specific type in the cluster/namespace
          restrictions:
            workloadMinWasteUSDPerMonth: 5 # Activates automation only if monthly waste exceeds a set threshold (for example, $5)
            cpuManagement:
              request:
                increaseEnabled: true # Allows PerfectScale Automation to increase CPU requests if the performance risks are observed
                decreaseEnabled: true # Allows PerfectScale Automation to decrease CPU requests to minimize waste
              limit:
                keepLimit: false # Automation will maintain a non-zero CPU limit and will not set the value to zero
            memoryManagement:
              request:
                increaseEnabled: true # Allows PerfectScale Automation to increase Memory requests if the performance risks are observed
                decreaseEnabled: true # Allows PerfectScale Automation to decrease Memory requests to minimize waste
              limit:
                increaseEnabled: true # Allows PerfectScale Automation to increase Memory limit if the performance risks are observed
                decreaseEnabled: true # Allows PerfectScale Automation to decrease Memory limit

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

Let's explore additional examples of automation configurations that offer more granular and flexible control over Automation:

This configuration enables automation for all workloads in a cluster with type: Deployment. Learn more about enabling automation for particular workload types , , or .

PerfectScale recommends you start with the cluster .

Explore more configuration examples at our .

Recommended adoption path

⚡
troubleshooting
contact support
👉
GitHub
How to include a cluster, namespace, or workload in the Automation configuration
How to exclude a namespace or workload from the Automation configuration
in a cluster
specific namespace
specific workloads
cost-saving automation configuration