> For the complete documentation index, see [llms.txt](https://docs.perfectscale.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.perfectscale.io/visibility-and-optimization/karpenter-optimization.md).

# Karpenter optimization

{% hint style="info" %}
Karpenter recommendations require exporter version **v1.1.11** or later.
{% endhint %}

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.

<figure><img src="/files/dyGnV6TC7NcLHpeTQN4H" alt=""><figcaption><p>Karpenter label</p></figcaption></figure>

## Explore your Karpenter configuration

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

<figure><img src="/files/3FO6PvYeLzPMXnRdfO18" alt=""><figcaption><p>Karpenter configuration</p></figcaption></figure>

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

## Node group view

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

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

<figure><img src="/files/55W6GvRDJXYGyYuqQTCo" alt=""><figcaption><p>Cluster autoscaler filter</p></figcaption></figure>

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.

{% hint style="info" %}
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](/enable-automation/automation-setup-instructions.md) or by manually applying [PerfectScale recommendations](/visibility-and-optimization/podfit-or-vertical-pod-right-sizing.md#detailed-workload-analysis). This allows Karpenter recommendations to be calibrated based on actual resource utilization, ensuring the best outcome.
{% endhint %}

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.

<figure><img src="/files/g0sA6Oo1ntpHBZ5BRndx" alt=""><figcaption><p>Karpenter recommendations</p></figcaption></figure>

PerfectScale provides the following recommendation types:

<table><thead><tr><th width="238.79296875">Recommendation type</th><th>Description</th></tr></thead><tbody><tr><td>Consolidation Policy Optimization</td><td>Provides recommendations for the consolidation policy to optimize underutilized nodes and increase cost-saving opportunities.</td></tr><tr><td>Consolidation Delay Enablement</td><td>Provides recommendations for the consolidation delay to enable timely consolidation while avoiding overly aggressive disruption.</td></tr><tr><td>Static NodePool Detection</td><td>Provides recommendations for NodePool flexibility to improve Karpenter’s ability to scale dynamically based on workload demand and increase consolidation opportunities.</td></tr><tr><td>Instance Generation Flexibility</td><td>Provides recommendations for Karpenter flexibility to expand instance selection options, helping Karpenter choose cheaper, newer, or more available instances.</td></tr><tr><td>Instance Family Modernization</td><td>Provides recommendations for instance family flexibility by suggesting better generations of the same instance family.</td></tr><tr><td>Instance Category Recommendation</td><td>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.</td></tr><tr><td>Instance Type Pinning Prevention</td><td>Provides recommendations for switching to broader instance selection criteria to increase scheduling flexibility and avoid capacity shortages.</td></tr><tr><td>NodePool Limits Near Exhaustion</td><td>Provides recommendations to increase NodePool resource limits when they are near exhaustion, creating additional headroom for burst workloads, scaling needs, and node consolidation.</td></tr></tbody></table>

{% hint style="success" %}
PerfectScale highly values your feedback on node recommendations. Don’t forget to share your feedback and let us know what you think.
{% endhint %}

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.

<figure><img src="/files/blDTGe0EAZ5rV1cpqlZm" alt=""><figcaption><p>Detailed Karpenter recommendations</p></figcaption></figure>

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.

<figure><img src="/files/49WeTgGz8bMKjTKkpILY" alt=""><figcaption><p>Apply recommended configuration YAML</p></figcaption></figure>

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](/visibility-and-optimization/infrafit-or-node-right-sizing/node-group-view.md#unevictable-pods-view).

<figure><img src="/files/QtlM2TgjxbRDNObI9S0s" alt=""><figcaption><p>Unevictable pods view</p></figcaption></figure>

#### **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`**.

<figure><img src="/files/rQDPJywsIZudRtmIoSk6" alt=""><figcaption><p>Mute recommendations</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.perfectscale.io/visibility-and-optimization/karpenter-optimization.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
