Skip to content
Docs Try Aspire

StatefulSet

Class sealed net10.0
📦 Aspire.Hosting.Kubernetes v13.1.2-preview.1.26125.13
Represents a Kubernetes StatefulSet resource in the "apps/v1" API group.
namespace Aspire.Hosting.Kubernetes.Resources;
public sealed class StatefulSet
: Aspire.Hosting.Kubernetes.Resources.Workload
{
// ...
}
A StatefulSet manages the deployment and scaling of a set of Pods, while ensuring that their order and state are preserved. StatefulSets are typically used for applications that require stable network identities and persistent storage, such as databases or distributed systems. This class provides an abstraction for defining the configuration of a StatefulSet object in YAML, aligning with the Kubernetes specification.
The StatefulSet class can be used to define the desired state of a set of Pods and associated resources in a Kubernetes cluster. The resource is serialized to YAML for use with Kubernetes manifests.