# HorizontalPodAutoscaler Properties

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [HorizontalPodAutoscaler](/reference/api/csharp/aspire.hosting.kubernetes/horizontalpodautoscaler.md)
- Kind: `Properties`
- Members: `1`

Represents the Kubernetes HorizontalPodAutoscaler resource for managing the dynamic scaling of pods based on custom or predefined metrics.

## Spec

- Name: `Spec`
- Modifiers: `get; set`
- Returns: [HorizontalPodAutoscalerSpecV1](/reference/api/csharp/aspire.hosting.kubernetes/horizontalpodautoscalerspecv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/HorizontalPodAutoscalerV1.cs)

Gets or sets the specification that defines the desired behavior of the Horizontal Pod Autoscaler.

```csharp
public HorizontalPodAutoscalerSpecV1 Spec { get; set; }
```

## Remarks

This property holds the configuration details for the autoscaling behavior, including metrics such as CPU usage, target resource references, and the range of permissible replica counts.
