Skip to content

Commit

Permalink
StatefulSet 1.9 updates. (#6550)
Browse files Browse the repository at this point in the history
* updates sts concept and tutorials to use 1.9 apps/v1

* Update statefulset.md

* clarify pod name label
  • Loading branch information
kow3ns authored and zacharysarah committed Dec 11, 2017
1 parent 2d09a2a commit 74b4cb6
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
15 changes: 12 additions & 3 deletions docs/concepts/workloads/controllers/statefulset.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down Expand Up @@ -66,7 +69,7 @@ spec:
selector:
app: nginx
---
apiVersion: apps/v1beta2
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: web
Expand Down Expand Up @@ -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}.
Expand Down
2 changes: 1 addition & 1 deletion docs/tasks/run-application/mysql-statefulset.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1beta2 # for versions before 1.8.0 use apps/v1beta1
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mysql
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
apiVersion: apps/v1beta2
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: cassandra
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/stateful-application/web.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/stateful-application/webp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/stateful-application/zookeeper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 74b4cb6

Please sign in to comment.