Class StatefulSet

  • All Implemented Interfaces:
    IApiEndpoint, IApiResource, INetworkPolicyPeer, IPodSelector, IResource, ISubject, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

    @Generated(value="jsii-pacmak/1.65.0 (build 7a02b7f)",
               date="2022-08-21T02:57:21.503Z")
    @Stability(Stable)
    public class StatefulSet
    extends Workload
    StatefulSet is the workload API object used to manage stateful applications.

    Manages the deployment and scaling of a set of Pods, and provides guarantees about the ordering and uniqueness of these Pods.

    Like a Deployment, a StatefulSet manages Pods that are based on an identical container spec. Unlike a Deployment, a StatefulSet maintains a sticky identity for each of their Pods. These pods are created from the same spec, but are not interchangeable: each has a persistent identifier that it maintains across any rescheduling.

    If you want to use storage volumes to provide persistence for your workload, you can use a StatefulSet as part of the solution. Although individual Pods in a StatefulSet are susceptible to failure, the persistent Pod identifiers make it easier to match existing volumes to the new Pods that replace any that have failed.

    Using StatefulSets

    StatefulSets are valuable for applications that require one or more of the following.

    • Stable, unique network identifiers.
    • Stable, persistent storage.
    • Ordered, graceful deployment and scaling.
    • Ordered, automated rolling updates.
    • Constructor Detail

      • StatefulSet

        protected StatefulSet​(software.amazon.jsii.JsiiObjectRef objRef)
      • StatefulSet

        protected StatefulSet​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      • StatefulSet

        @Stability(Stable)
        public StatefulSet​(@NotNull
                           software.constructs.Construct scope,
                           @NotNull
                           String id,
                           @NotNull
                           StatefulSetProps props)
        Parameters:
        scope - This parameter is required.
        id - This parameter is required.
        props - This parameter is required.