Set Resource Limits

Set resource limits with Karpenter

Karpenter automatically provisions instances from the cloud provider. This often incurs hard costs. To control resource utilization and cluster size, use resource limits.

The provisioner spec includes a limits section (spec.limits.resources), which constrains the maximum amount of resources that the provisioner will manage.

For example, setting “spec.limits.resources.cpu” to “1000” limits the provisioner to a total of 1000 CPU cores across all instances. This prevents unwanted excessive growth of a cluster.

Karpenter supports limits of any resource type that is reported by your cloud provider.

CPU limits are described with a DecimalSI value, usually a natural integer.

Memory limits are described with a BinarySI value, such as 1000Gi.

You can view the current consumption of cpu and memory on your cluster by running:

kubectl get provisioner -o=jsonpath='{.items[0].status}'

Review the Kubernetes core API ( for more information on resources.


Example Provisioner:

kind: Provisioner
  name: default
    - key:
      operator: In
      values: ["spot"]
      cpu: 1000 
      memory: 1000Gi 2
Last modified August 17, 2022 : v0.15.0 (#2303) (c075cbd6)