Automation setup instruction
Set up PerfectScale Automation in minutes and start seeing instant optimization results with just a few simple steps
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.
To set up Automation, you can either follow the installation guide below or complete the setup directly within the platform. Both options make it easy to get started, so you can choose the one that best fits your workflow.
To access the Automation enablement guide within the platform, go to the Overview screen, hover over the cluster you want to automate, and click the Configure button under the Automated column.

Step 1: Install PerfectScale Automation Agent
When deploying the PerfectScale Automation Agent in a GKE Private Cluster, you need to create an additional firewall rule. This enables the Control Plane address range to communicate with the Cluster Pod IPv4 address range on port 8443. If the webhook call fails, see the troubleshooting guide.
Deploy the PerfectScale automation agent. In order to install the PerfectScale automation agent, run the following commands:
and
If taints and tolerations are defined in the node pool, you must include them in the command too, so it will appear like this:
If you utilize CI/CD tools with auto-sync, ensure to review the additional configuration steps. Automation with GitOps
Follow the troubleshooting instructions provided, or contact support if you encounter any issues.
Verify Automation Agent Installation
To test and confirm that the Automation Agent was installed successfully, run the following command:
Disabling Webhook for Specific Namespaces
Once the autoscaler is installed, all pods in the cluster go through the admission webhook. You can exclude specific namespaces from this process by disabling the webhook for them. For example:
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:
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:
This configuration enables automation for all workloads in a cluster with type: Deployment. Learn more about enabling automation for particular workload types in a cluster, specific namespace, or specific workloads.
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.
PerfectScale recommends you start with the cluster cost-saving automation configuration.
👉 Explore more configuration examples at our GitHub.
⚡ Recommended adoption path
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:
Apply the created configuration by running the following command (where cluster-automation-config.yaml - the name of your file created in the previous step):
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:
Apply the created configuration by running the following command (where cluster-automation-config.yaml - the name of your file created in the previous step):
Let's explore additional examples of automation configurations that offer more granular and flexible control over Automation:
Automation configuration defaults
Some automation configuration settings have predefined defaults. If you don’t specify a value, PerfectScale will automatically apply the default for that field. Below is the list of configurations and their default values.
stopAllAutomation
false
cleanupAllAutomation
false
automationMode
Enabled
workloadLabelSelectors
nil
wasteMaxAutomationFrequency
Deployment: 30m
Rollout: 30m
CronJob: 30m
Job: 30m
DaemonSet: 4h
StatefulSet: 24h
fixResiliencyMaxAutomationFrequency
30m
maintenanceWindowIgnoredForResiliency
false
maintenanceWindowIgnoredMinResiliencyLevel
""
maintenanceWindow
workloadMinWasteUSDPerMonth
5
cpuManagement
request:
IncreaseEnabled: false DecreaseEnabled: true MinimumCores: -1 // no limit MaximumCores: -1 //no limit limit: KeepLimit: true
memoryManagement
request:
IncreaseEnabled: false DecreaseEnabled: true MinimumGiB: -1 // no limit MaximumGib: -1 //no limit limit: IncreaseEnabled: false DecreaseEnabled: false MinimumGiB: -1 // no limit MaximumGib: -1 //no limit maxMemoryIncreaseIterations: Daily: 3 Weekly: 6
Last updated
Was this helpful?