Merge branch 'master' into release-1.8
This commit is contained in:
@@ -22,14 +22,14 @@ following Kubernetes concepts.
|
||||
* [Pods](/docs/user-guide/pods/single-container/)
|
||||
* [Cluster DNS](/docs/concepts/services-networking/dns-pod-service/)
|
||||
* [Headless Services](/docs/concepts/services-networking/service/#headless-services)
|
||||
* [PersistentVolumes](/docs/concepts/storage/volumes/)
|
||||
* [PersistentVolumes](/docs/concepts/storage/persistent-volumes/)
|
||||
* [PersistentVolume Provisioning](https://github.com/kubernetes/examples/tree/{{page.githubbranch}}/staging/persistent-volume-provisioning/)
|
||||
* [StatefulSets](/docs/concepts/abstractions/controllers/statefulsets/)
|
||||
* [kubectl CLI](/docs/user-guide/kubectl)
|
||||
|
||||
This tutorial assumes that your cluster is configured to dynamically provision
|
||||
PersistentVolumes. If your cluster is not configured to do so, you
|
||||
will have to manually provision five 1 GiB volumes prior to starting this
|
||||
will have to manually provision two 1 GiB volumes prior to starting this
|
||||
tutorial.
|
||||
{% endcapture %}
|
||||
|
||||
@@ -37,7 +37,7 @@ tutorial.
|
||||
StatefulSets are intended to be used with stateful applications and distributed
|
||||
systems. However, the administration of stateful applications and
|
||||
distributed systems on Kubernetes is a broad, complex topic. In order to
|
||||
demonstrate the basic features of a StatefulSet, and to not conflate the former
|
||||
demonstrate the basic features of a StatefulSet, and not to conflate the former
|
||||
topic with the latter, you will deploy a simple web application using a StatefulSet.
|
||||
|
||||
After this tutorial, you will be familiar with the following.
|
||||
@@ -262,8 +262,7 @@ www-web-0 Bound pvc-15c268c7-b507-11e6-932f-42010a800002 1Gi RWO
|
||||
www-web-1 Bound pvc-15c79307-b507-11e6-932f-42010a800002 1Gi RWO 48s
|
||||
```
|
||||
The StatefulSet controller created two PersistentVolumeClaims that are
|
||||
bound to two [PersistentVolumes](/docs/concepts/storage/volumes/). As the
|
||||
cluster used in this tutorial is configured to dynamically provision
|
||||
bound to two [PersistentVolumes](/docs/concepts/storage/persistent-volumes/). As the cluster used in this tutorial is configured to dynamically provision
|
||||
PersistentVolumes, the PersistentVolumes were created and bound automatically.
|
||||
|
||||
The NGINX webservers, by default, will serve an index file at
|
||||
@@ -330,7 +329,7 @@ web-1
|
||||
|
||||
Even though `web-0` and `web-1` were rescheduled, they continue to serve their
|
||||
hostnames because the PersistentVolumes associated with their
|
||||
PersistentVolumeClaims are remounted to their `volumeMount`s. No matter what
|
||||
PersistentVolumeClaims are remounted to their `volumeMounts`. No matter what
|
||||
node `web-0`and `web-1` are scheduled on, their PersistentVolumes will be
|
||||
mounted to the appropriate mount points.
|
||||
|
||||
@@ -338,8 +337,7 @@ mounted to the appropriate mount points.
|
||||
Scaling a StatefulSet refers to increasing or decreasing the number of replicas.
|
||||
This is accomplished by updating the `replicas` field. You can use either
|
||||
[`kubectl scale`](/docs/user-guide/kubectl/{{page.version}}/#scale) or
|
||||
[`kubectl patch`](/docs/user-guide/kubectl/{{page.version}}/#patch) to scale a Stateful
|
||||
Set.
|
||||
[`kubectl patch`](/docs/user-guide/kubectl/{{page.version}}/#patch) to scale a StatefulSet.
|
||||
|
||||
### Scaling Up
|
||||
|
||||
@@ -440,10 +438,7 @@ www-web-4 Bound pvc-e11bb5f8-b508-11e6-932f-42010a800002 1Gi RWO
|
||||
```
|
||||
|
||||
There are still five PersistentVolumeClaims and five PersistentVolumes.
|
||||
When exploring a Pod's [stable storage](#stable-storage), we saw that the
|
||||
PersistentVolumes mounted to the Pods of a StatefulSet are not deleted when
|
||||
the StatefulSet's Pods are deleted. This is still true when Pod deletion is
|
||||
caused by scaling the StatefulSet down.
|
||||
When exploring a Pod's [stable storage](#writing-to-stable-storage), we saw that the PersistentVolumes mounted to the Pods of a StatefulSet are not deleted whenthe StatefulSet's Pods are deleted. This is still true when Pod deletion is caused by scaling the StatefulSet down.
|
||||
|
||||
## Updating StatefulSets
|
||||
|
||||
@@ -721,8 +716,7 @@ automatically update Pods when a modification is made to the StatefulSet's
|
||||
## Deleting StatefulSets
|
||||
|
||||
StatefulSet supports both Non-Cascading and Cascading deletion. In a
|
||||
Non-Cascading Delete, the StatefulSet's Pods are not deleted when the Stateful
|
||||
Set is deleted. In a Cascading Delete, both the StatefulSet and its Pods are
|
||||
Non-Cascading Delete, the StatefulSet's Pods are not deleted when the StatefulSet is deleted. In a Cascading Delete, both the StatefulSet and its Pods are
|
||||
deleted.
|
||||
|
||||
### Non-Cascading Delete
|
||||
@@ -866,7 +860,7 @@ web-1 0/1 Terminating 0 29m
|
||||
|
||||
```
|
||||
|
||||
As you saw in the [Scaling Down](#ordered-pod-termination) section, the Pods
|
||||
As you saw in the [Scaling Down](#scaling-down) section, the Pods
|
||||
are terminated one at a time, with respect to the reverse order of their ordinal
|
||||
indices. Before terminating a Pod, the StatefulSet controller waits for
|
||||
the Pod's successor to be completely terminated.
|
||||
|
||||
Reference in New Issue
Block a user