Skip to content
Docs Try Aspire

HorizontalPodAutoscaler

Class sealed net10.0
📦 Aspire.Hosting.Kubernetes v13.1.2-preview.1.26125.13
Represents the Kubernetes HorizontalPodAutoscaler resource for managing the dynamic scaling of pods based on custom or predefined metrics.
namespace Aspire.Hosting.Kubernetes.Resources;
public sealed class HorizontalPodAutoscaler
: Aspire.Hosting.Kubernetes.Resources.BaseKubernetesResource
{
// ...
}
The HorizontalPodAutoscaler resource is part of the Kubernetes autoscaling/v1 API version. It automatically adjusts the number of replicas in a replication controller, deployment, or replica set based on observed metrics such as CPU utilization. This class encapsulates the configuration settings, including the scaling target reference and metric thresholds, required to define a HorizontalPodAutoscaler in a Kubernetes cluster.