Module autoscaling/v2beta2

@pulumi/kubernetes > autoscaling > v2beta2

Index

types/input.ts types/output.ts

function isCrossVersionObjectReference

isCrossVersionObjectReference(o: any): boolean

function isHorizontalPodAutoscaler

isHorizontalPodAutoscaler(o: any): boolean

function isHorizontalPodAutoscalerList

isHorizontalPodAutoscalerList(o: any): boolean

interface CrossVersionObjectReference

CrossVersionObjectReference contains enough information to let you identify the referred resource.

property apiVersion

apiVersion: string;

API version of the referent

property kind

kind: string;

Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds”

property name

name: string;

Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names

interface ExternalMetricSource

ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).

property metric

metric: MetricIdentifier;

metric identifies the target metric by name and selector

property target

target: MetricTarget;

target specifies the target value for the given metric

interface ExternalMetricStatus

ExternalMetricStatus indicates the current value of a global metric not associated with any Kubernetes object.

property current

current: MetricValueStatus;

current contains the current value for the given metric

property metric

metric: MetricIdentifier;

metric identifies the target metric by name and selector

interface HorizontalPodAutoscaler

HorizontalPodAutoscaler is the configuration for a horizontal pod autoscaler, which automatically manages the replica count of any resource implementing the scale subresource based on the metrics specified.

property apiVersion

apiVersion: string;

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/api-conventions.md#resources

property kind

kind: string;

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/api-conventions.md#types-kinds

property metadata

metadata: ObjectMeta;

metadata is the standard object metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata

property spec

spec: HorizontalPodAutoscalerSpec;

spec is the specification for the behaviour of the autoscaler. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.

property status

status: HorizontalPodAutoscalerStatus;

status is the current information about the autoscaler.

interface HorizontalPodAutoscalerCondition

HorizontalPodAutoscalerCondition describes the state of a HorizontalPodAutoscaler at a certain point.

property lastTransitionTime

lastTransitionTime: string;

lastTransitionTime is the last time the condition transitioned from one status to another

property message

message: string;

message is a human-readable explanation containing details about the transition

property reason

reason: string;

reason is the reason for the condition’s last transition.

property status

status: string;

status is the status of the condition (True, False, Unknown)

property type

type: string;

type describes the current condition

interface HorizontalPodAutoscalerList

HorizontalPodAutoscalerList is a list of horizontal pod autoscaler objects.

property apiVersion

apiVersion: string;

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/api-conventions.md#resources

property items

items: HorizontalPodAutoscaler[];

items is the list of horizontal pod autoscaler objects.

property kind

kind: string;

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/api-conventions.md#types-kinds

property metadata

metadata: ListMeta;

metadata is the standard list metadata.

interface HorizontalPodAutoscalerSpec

HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.

property maxReplicas

maxReplicas: number;

maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up. It cannot be less that minReplicas.

property metrics

metrics: MetricSpec[];

metrics contains the specifications for which to use to calculate the desired replica count (the maximum replica count across all metrics will be used). The desired replica count is calculated multiplying the ratio between the target value and the current value by the current number of pods. Ergo, metrics used must decrease as the pod count is increased, and vice-versa. See the individual metric source types for more information about how each type of metric must respond. If not set, the default metric will be set to 80% average CPU utilization.

property minReplicas

minReplicas: number;

minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down. It defaults to 1 pod.

property scaleTargetRef

scaleTargetRef: CrossVersionObjectReference;

scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.

interface HorizontalPodAutoscalerStatus

HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.

property conditions

conditions: HorizontalPodAutoscalerCondition[];

conditions is the set of conditions required for this autoscaler to scale its target, and indicates whether or not those conditions are met.

property currentMetrics

currentMetrics: MetricStatus[];

currentMetrics is the last read state of the metrics used by this autoscaler.

property currentReplicas

currentReplicas: number;

currentReplicas is current number of replicas of pods managed by this autoscaler, as last seen by the autoscaler.

property desiredReplicas

desiredReplicas: number;

desiredReplicas is the desired number of replicas of pods managed by this autoscaler, as last calculated by the autoscaler.

property lastScaleTime

lastScaleTime: string;

lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods, used by the autoscaler to control how often the number of pods is changed.

property observedGeneration

observedGeneration: number;

observedGeneration is the most recent generation observed by this autoscaler.

interface MetricIdentifier

MetricIdentifier defines the name and optionally selector for a metric

property name

name: string;

name is the name of the given metric

property selector

selector: LabelSelector;

selector is the string-encoded form of a standard kubernetes label selector for the given metric When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. When unset, just the metricName will be used to gather metrics.

interface MetricSpec

MetricSpec specifies how to scale based on a single metric (only type and one other matching field should be set at once).

property external

external: ExternalMetricSource;

external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).

property object

object: ObjectMetricSource;

object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).

property pods

pods: PodsMetricSource;

pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.

property resource

resource: ResourceMetricSource;

resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the “pods” source.

property type

type: string;

type is the type of metric source. It should be one of “Object”, “Pods” or “Resource”, each mapping to a matching field in the object.

interface MetricStatus

MetricStatus describes the last-read state of a single metric.

property external

external: ExternalMetricStatus;

external refers to a global metric that is not associated with any Kubernetes object. It allows autoscaling based on information coming from components running outside of cluster (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).

property object

object: ObjectMetricStatus;

object refers to a metric describing a single kubernetes object (for example, hits-per-second on an Ingress object).

property pods

pods: PodsMetricStatus;

pods refers to a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.

property resource

resource: ResourceMetricStatus;

resource refers to a resource metric (such as those specified in requests and limits) known to Kubernetes describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the “pods” source.

property type

type: string;

type is the type of metric source. It will be one of “Object”, “Pods” or “Resource”, each corresponds to a matching field in the object.

interface MetricTarget

MetricTarget defines the target value, average value, or average utilization of a specific metric

property averageUtilization

averageUtilization: number;

averageUtilization is the target value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods. Currently only valid for Resource metric source type

property averageValue

averageValue: string;

averageValue is the target value of the average of the metric across all relevant pods (as a quantity)

property type

type: string;

type represents whether the metric type is Utilization, Value, or AverageValue

property value

value: string;

value is the target value of the metric (as a quantity).

interface MetricValueStatus

MetricValueStatus holds the current value for a metric

property averageUtilization

averageUtilization: number;

currentAverageUtilization is the current value of the average of the resource metric across all relevant pods, represented as a percentage of the requested value of the resource for the pods.

property averageValue

averageValue: string;

averageValue is the current value of the average of the metric across all relevant pods (as a quantity)

property value

value: string;

value is the current value of the metric (as a quantity).

interface ObjectMetricSource

ObjectMetricSource indicates how to scale on a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).

property describedObject

describedObject: CrossVersionObjectReference;

property metric

metric: MetricIdentifier;

metric identifies the target metric by name and selector

property target

target: MetricTarget;

target specifies the target value for the given metric

interface ObjectMetricStatus

ObjectMetricStatus indicates the current value of a metric describing a kubernetes object (for example, hits-per-second on an Ingress object).

property current

current: MetricValueStatus;

current contains the current value for the given metric

property describedObject

describedObject: CrossVersionObjectReference;

property metric

metric: MetricIdentifier;

metric identifies the target metric by name and selector

interface PodsMetricSource

PodsMetricSource indicates how to scale on a metric describing each pod in the current scale target (for example, transactions-processed-per-second). The values will be averaged together before being compared to the target value.

property metric

metric: MetricIdentifier;

metric identifies the target metric by name and selector

property target

target: MetricTarget;

target specifies the target value for the given metric

interface PodsMetricStatus

PodsMetricStatus indicates the current value of a metric describing each pod in the current scale target (for example, transactions-processed-per-second).

property current

current: MetricValueStatus;

current contains the current value for the given metric

property metric

metric: MetricIdentifier;

metric identifies the target metric by name and selector

interface ResourceMetricSource

ResourceMetricSource indicates how to scale on a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). The values will be averaged together before being compared to the target. Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the “pods” source. Only one “target” type should be set.

property name

name: string;

name is the name of the resource in question.

property target

target: MetricTarget;

target specifies the target value for the given metric

interface ResourceMetricStatus

ResourceMetricStatus indicates the current value of a resource metric known to Kubernetes, as specified in requests and limits, describing each pod in the current scale target (e.g. CPU or memory). Such metrics are built in to Kubernetes, and have special scaling options on top of those available to normal per-pod metrics using the “pods” source.

property current

current: MetricValueStatus;

current contains the current value for the given metric

property name

name: string;

Name is the name of the resource in question.