For the complete documentation index, see llms.txt. This page is also available as Markdown.

Karpenter optimization

Maximize Karpenter efficiency with granular visibility and data-driven recommendations

Karpenter recommendations require exporter version v1.1.11 or later.

Karpenter helps Kubernetes teams improve infrastructure efficiency by dynamically provisioning the right compute capacity for their workloads. However, to achieve the full value of node autoscaling, teams need to ensure that Karpenter NodePools are well configured and aligned with workload requirements.

PerfectScale provides granular visibility into Karpenter configurations and delivers actionable recommendations to improve them. By evaluating Karpenter NodePool settings and workload behavior, it identifies suboptimal configurations and generates recommendations that help teams maximize autoscaling outcomes.

When Karpenter is detected in the cluster and associated with a specific node group, a dedicated label and the Karpenter version are displayed in the InfraFit screen header and next to the relevant node group.

Karpenter label

Explore your Karpenter configuration

Hover over the node group with the Karpenter label and click the </> button to access the Karpenter configuration CR.

Karpenter configuration

This view provides visibility into the NodePool and EC2 configuration, as well as a history of configuration changes.

Node group view

When node autoscaler, such as Karpenter or Cluster Autoscaler, is detected in the cluster, additional visibility capabilities become available.

You can easily filter node groups by the detected cluster autoscaling solution. Click the Node Group drop-down and select the relevant value.

Cluster autoscaler filter

Also, you can filter the data by consolidation policy, whether it is WhenEmpty or WhenEmptyOrUnderutilized. Click the Consolidation drop-down and select the relevant value from the list.

Karpenter recommendations

When Karpenter is detected, PerfectScale analyzes its current configuration and evaluates its efficiency against the resource requests of running workloads. If inefficiencies are identified, PerfectScale provides data-driven recommendations to help improve the configuration and maximize autoscaling outcomes.

Karpenter recommendations are based on the current workload requests and limits. For more accurate and effective recommendations, we recommend right-sizing workloads first, either by enabling autonomous PerfectScale optimization or by manually applying PerfectScale recommendations. This allows Karpenter recommendations to be calibrated based on actual resource utilization, ensuring the best outcome.

When Karpenter recommendations are available, they are displayed in the Node Recommendation column in the following format: Recommendation Name → Recommended Value. The recommended value may include removing an existing configuration, modifying the current value, or adding a new one.

Karpenter recommendations

PerfectScale provides the following recommendation types:

Recommendation type
Description

Consolidation Policy Optimization

Provides recommendations for the consolidation policy to optimize underutilized nodes and increase cost-saving opportunities.

Consolidation Delay Enablement

Provides recommendations for the consolidation delay to enable timely consolidation while avoiding overly aggressive disruption.

Static NodePool Detection

Provides recommendations for NodePool flexibility to improve Karpenter’s ability to scale dynamically based on workload demand and increase consolidation opportunities.

Instance Generation Flexibility

Provides recommendations for Karpenter flexibility to expand instance selection options, helping Karpenter choose cheaper, newer, or more available instances.

Instance Family Modernization

Provides recommendations for instance family flexibility by suggesting better generations of the same instance family.

Instance Category Recommendation

Provides recommendations for instance category selection by evaluating the aggregate CPU-to-memory profile of workloads in the NodePool and suggesting an instance category that better matches the workload shape.

Instance Type Pinning Prevention

Provides recommendations for switching to broader instance selection criteria to increase scheduling flexibility and avoid capacity shortages.

NodePool Limits Near Exhaustion

Provides recommendations to increase NodePool resource limits when they are near exhaustion, creating additional headroom for burst workloads, scaling needs, and node consolidation.

Click a specific node group to drill down and access the full recommendations view. This view provides a centralized overview of the node pool’s current configuration and optimization recommendations, including a detailed breakdown of the suggested actions and the factors influencing them. It also displays the node pool CPU-to-memory ratio, detected constraints, and any identified unevictable pods that may prevent nodes from being safely scaled down.

Detailed Karpenter recommendations

Click the </> button to open the YAML Recommendations Configuration popup.

This view displays the full current Karpenter configuration along with the recommended values, highlighting the areas PerfectScale recommends changing to improve efficiency. Click Copy to Clipboard to copy the final configuration with the recommended values, so you can seamlessly apply the updated configuration.

Apply recommended configuration YAML

Clicking the View pods button next to the detected unevictable pods opens the granular Unevictable Pods dashboard. This dashboard shows the pod distribution within the node group, highlights the pods that cannot be evicted, and provides detailed pod and node data to support further investigation. Learn more about Unevictable pods.

Unevictable pods view

Muting the recommendations

To hide recommendations for a specific node group, click the Mute button for that node group. PerfectScale will stop displaying recommendations for it. You can restore them at any time by clicking Unmute.

Mute recommendations

Last updated

Was this helpful?