CapacityBuffer is the configuration that an autoscaler can use to provision buffer capacity within a cluster. This buffer is represented by placeholder pods that trigger the Cluster Autoscaler to scale up nodes in advance, ensuring that there is always spare capacity available to handle sudden workload spikes or to speed up scaling events.
Unchanged since Karpenter v1.14.0
APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
spec defines the desired characteristics of the buffer.
limits specifies resource constraints that limit the number of chunks created for this buffer based on total resource requests (e.g., CPU, memory). If there are no other limitations for the number of chunks (i.e., `replicas` or `percentage` are not set), this will be used to create as many chunks as fit into these limits.
percentage defines the desired buffer capacity as a percentage of the `scalableRef`'s current replicas. This is only applicable if `scalableRef` is set. The absolute number of replicas is calculated from the percentage by rounding up to a minimum of 1. For example, if `scalableRef` has 10 replicas and `percentage` is 20, 2 buffer chunks will be created.
podTemplateRef is a reference to a PodTemplate resource in the same namespace that declares the shape of a single chunk of the buffer. The pods created from this template will be used as placeholder pods for the buffer capacity. Exactly one of `podTemplateRef`, `scalableRef` should be specified.
name of the referent.
provisioningStrategy defines how the buffer is utilized. "buffer.x-k8s.io/active-capacity" is the default strategy, where the buffer actively scales up the cluster by creating placeholder pods.
replicas defines the desired number of buffer chunks to provision. If neither `replicas` nor `percentage` is set, as many chunks as fit within defined resource limits (if any) will be created. If both are set, the minimum of the two will be used.
scalableRef is a reference to an object of a kind that has a scale subresource and specifies its label selector field. This allows the CapacityBuffer to manage the buffer by scaling an existing scalable resource. Exactly one of `podTemplateRef`, `scalableRef` should be specified.
apiGroup is the API group of the referent. Empty string for the core API group.
kind is the kind of the referent.
name is the name of the referent.
status represents the current state of the buffer and its readiness for autoprovisioning.
conditions provide a standard mechanism for reporting the buffer's state. The "Ready" condition indicates if the buffer is successfully provisioned and active. Other conditions may report on various aspects of the buffer's health and provisioning process.
lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
message is a human readable message indicating details about the transition. This may be an empty string.
observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
status of the condition, one of True, False, Unknown.
type of condition in CamelCase or in foo.example.com/CamelCase.
podTemplateGeneration is the observed generation of the PodTemplate, used to determine if the status is up-to-date with the desired `spec.podTemplateRef`.
podTemplateRef is the observed reference to the PodTemplate that was used to provision the buffer. If this field is not set, and the `conditions` indicate an error, it provides details about the error state.
name of the referent.
provisioningStrategy defines how the buffer should be utilized.
replicas is the actual number of buffer chunks currently provisioned.
Source: autoscaling.x-k8s.io_capacitybuffers.yaml
Changes to CapacityBuffer (autoscaling.x-k8s.io/v1beta1) in each Karpenter version, compared to the version before it.
CapacityBuffer was first seen on this version of Karpenter
Released · View CapacityBuffer in v1.14.0
No examples of CapacityBuffer yet. Contribute one on GitHub.