# ReplicaSet

- Kind: `class`
- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Version: `13.3.0-preview.1.26254.5`
- Namespace: `Aspire.Hosting.Kubernetes.Resources`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/ReplicaSetV1.cs)
- Inherits: [BaseKubernetesResource](/reference/api/csharp/aspire.hosting.kubernetes/basekubernetesresource.md)

Represents a Kubernetes ReplicaSet resource in the `apps/v1` API version.

## Definition

```csharp
namespace Aspire.Hosting.Kubernetes.Resources;

public sealed class ReplicaSet
    : Aspire.Hosting.Kubernetes.Resources.BaseKubernetesResource
{
    // ...
}
```

## Remarks

A ReplicaSet ensures that a specified number of pod replicas are running at any given time. It is commonly used to maintain the desired state of a workload by managing the lifecycle of pods.

## Constructors

- [ReplicaSet](/reference/api/csharp/aspire.hosting.kubernetes/replicaset/constructors.md#constructor) -- Represents a Kubernetes ReplicaSet resource in the `apps/v1` API version.

## Properties

- [Spec](/reference/api/csharp/aspire.hosting.kubernetes/replicaset/properties.md#spec) : [ReplicaSetSpecV1](/reference/api/csharp/aspire.hosting.kubernetes/replicasetspecv1.md) `get; set` -- Gets or sets the specification that describes the desired behavior of the ReplicaSet resource.
