diff --git a/docs/concepts/workloads/controllers/statefulset.md b/docs/concepts/workloads/controllers/statefulset.md index 7fb2431cc3887..d2496f443afcb 100644 --- a/docs/concepts/workloads/controllers/statefulset.md +++ b/docs/concepts/workloads/controllers/statefulset.md @@ -10,8 +10,11 @@ title: StatefulSets --- {% capture overview %} -**StatefulSet is the workload API object used to manage stateful applications. -StatefulSets are beta in 1.8.** + +StatefulSet is the workload API object used to manage stateful applications. + +**Note:** StatefulSets are stable (GA) in 1.9. +{: .note} {% glossary_definition term_id="statefulset" length="all" %} {% endcapture %} @@ -66,7 +69,7 @@ spec: selector: app: nginx --- -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: StatefulSet metadata: name: web @@ -152,6 +155,12 @@ PersistentVolume Claims. Note that, the PersistentVolumes associated with the Pods' PersistentVolume Claims are not deleted when the Pods, or StatefulSet are deleted. This must be done manually. +### Pod Name Label + +When the StatefulSet controller creates a Pod, it adds a label, `statefulset.kubernetes.io/pod-name`, +that is set to the name of the Pod. This label allows you to attach a Service to a specific Pod in +the StatefulSet. + ## Deployment and Scaling Guarantees * For a StatefulSet with N replicas, when Pods are being deployed, they are created sequentially, in order from {0..N-1}. diff --git a/docs/tasks/run-application/mysql-statefulset.yaml b/docs/tasks/run-application/mysql-statefulset.yaml index ce4d3dd3c0cf7..e0c04007a872e 100644 --- a/docs/tasks/run-application/mysql-statefulset.yaml +++ b/docs/tasks/run-application/mysql-statefulset.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1beta2 # for versions before 1.8.0 use apps/v1beta1 +apiVersion: apps/v1 kind: StatefulSet metadata: name: mysql diff --git a/docs/tutorials/stateful-application/cassandra/cassandra-statefulset.yaml b/docs/tutorials/stateful-application/cassandra/cassandra-statefulset.yaml index 727813e132f53..dbcba6cbc72c2 100644 --- a/docs/tutorials/stateful-application/cassandra/cassandra-statefulset.yaml +++ b/docs/tutorials/stateful-application/cassandra/cassandra-statefulset.yaml @@ -1,4 +1,4 @@ -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: StatefulSet metadata: name: cassandra diff --git a/docs/tutorials/stateful-application/web.yaml b/docs/tutorials/stateful-application/web.yaml index 9f0ba1a343f5a..b4bc51574f11f 100644 --- a/docs/tutorials/stateful-application/web.yaml +++ b/docs/tutorials/stateful-application/web.yaml @@ -13,7 +13,7 @@ spec: selector: app: nginx --- -apiVersion: apps/v1beta2 # for versions before 1.8.0 use apps/v1beta1 +apiVersion: apps/v1 kind: StatefulSet metadata: name: web diff --git a/docs/tutorials/stateful-application/webp.yaml b/docs/tutorials/stateful-application/webp.yaml index 231883742718d..1b6b00d32b5b2 100644 --- a/docs/tutorials/stateful-application/webp.yaml +++ b/docs/tutorials/stateful-application/webp.yaml @@ -13,7 +13,7 @@ spec: selector: app: nginx --- -apiVersion: apps/v1beta2 # for versions before 1.8.0 use apps/v1beta1 +apiVersion: apps/v1 kind: StatefulSet metadata: name: web diff --git a/docs/tutorials/stateful-application/zookeeper.yaml b/docs/tutorials/stateful-application/zookeeper.yaml index f07708c398b93..16f52a530f2f2 100644 --- a/docs/tutorials/stateful-application/zookeeper.yaml +++ b/docs/tutorials/stateful-application/zookeeper.yaml @@ -38,7 +38,7 @@ spec: app: zk maxUnavailable: 1 --- -apiVersion: apps/v1beta2 # for versions before 1.8.0 use apps/v1beta1 +apiVersion: apps/v1 kind: StatefulSet metadata: name: zk