StatefulSet

StatefulSet represents a set of pods with consistent identities.

apiVersion: apps/v1

import "k8s.io/api/apps/v1"

StatefulSet

StatefulSet represents a set of pods with consistent identities. Identities are defined as:

  • Network: A single stable DNS and hostname.
  • Storage: As many VolumeClaims as requested. The StatefulSet guarantees that a given network identity will always map to the same storage identity.

StatefulSetSpec

A StatefulSetSpec is the specification of a StatefulSet.


StatefulSetStatus

StatefulSetStatus represents the current state of a StatefulSet.


  • replicas (int32), required

    replicas is the number of Pods created by the StatefulSet controller.

  • readyReplicas (int32)

    readyReplicas is the number of pods created for this StatefulSet with a Ready Condition.

  • currentReplicas (int32)

    currentReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by currentRevision.

  • updatedReplicas (int32)

    updatedReplicas is the number of Pods created by the StatefulSet controller from the StatefulSet version indicated by updateRevision.

  • availableReplicas (int32), required

    Total number of available pods (ready for at least minReadySeconds) targeted by this statefulset. This is a beta field and enabled/disabled by StatefulSetMinReadySeconds feature gate.

  • collisionCount (int32)

    collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.

  • conditions ([]StatefulSetCondition)

    Patch strategy: merge on key type

    Represents the latest available observations of a statefulset's current state.

    StatefulSetCondition describes the state of a statefulset at a certain point.

    • conditions.status (string), required

      Status of the condition, one of True, False, Unknown.

    • conditions.type (string), required

      Type of statefulset condition.

    • conditions.lastTransitionTime (Time)

      Last time the condition transitioned from one status to another.

      Time is a wrapper around time.Time which supports correct marshaling to YAML and JSON. Wrappers are provided for many of the factory methods that the time package offers.

    • conditions.message (string)

      A human readable message indicating details about the transition.

    • conditions.reason (string)

      The reason for the condition's last transition.

  • currentRevision (string)

    currentRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [0,currentReplicas).

  • updateRevision (string)

    updateRevision, if not empty, indicates the version of the StatefulSet used to generate Pods in the sequence [replicas-updatedReplicas,replicas)

  • observedGeneration (int64)

    observedGeneration is the most recent generation observed for this StatefulSet. It corresponds to the StatefulSet's generation, which is updated on mutation by the API Server.

StatefulSetList

StatefulSetList is a collection of StatefulSets.


Operations


get read the specified StatefulSet

HTTP Request

GET /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}

Parameters

Response

200 (

401: Unauthorized

get read status of the specified StatefulSet

HTTP Request

GET /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status

Parameters

Response

200 (

401: Unauthorized

list list or watch objects of kind StatefulSet

HTTP Request

GET /apis/apps/v1/namespaces/{namespace}/statefulsets

Parameters

Response

200 (

401: Unauthorized

list list or watch objects of kind StatefulSet

HTTP Request

GET /apis/apps/v1/statefulsets

Parameters

Response

200 (

401: Unauthorized

create create a StatefulSet

HTTP Request

POST /apis/apps/v1/namespaces/{namespace}/statefulsets

Parameters

Response

200 (

201 (

202 (

401: Unauthorized

update replace the specified StatefulSet

HTTP Request

PUT /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}

Parameters

Response

200 (

201 (

401: Unauthorized

update replace status of the specified StatefulSet

HTTP Request

PUT /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status

Parameters

Response

200 (

201 (

401: Unauthorized

patch partially update the specified StatefulSet

HTTP Request

PATCH /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}

Parameters

Response

200 (

201 (

401: Unauthorized

patch partially update status of the specified StatefulSet

HTTP Request

PATCH /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status

Parameters

Response

200 (

201 (

401: Unauthorized

delete delete a StatefulSet

HTTP Request

DELETE /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}

Parameters

Response

200 (

202 (

401: Unauthorized

deletecollection delete collection of StatefulSet

HTTP Request

DELETE /apis/apps/v1/namespaces/{namespace}/statefulsets

Parameters

Response

200 (

401: Unauthorized

Last modified December 08, 2021 at 9:34 AM PST: