Skip to content

Commit 2392759

Browse files
authored
Merge pull request #45373 from jjkjjk23/main
Added line to StatefulSet documentation clarifying the need for a suitable pre-existing PersistentVolume.
2 parents b3538b0 + 4ec042c commit 2392759

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

content/en/docs/concepts/storage/dynamic-provisioning.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ calls to their cloud or storage provider to create new storage volumes, and
1717
then create [`PersistentVolume` objects](/docs/concepts/storage/persistent-volumes/)
1818
to represent them in Kubernetes. The dynamic provisioning feature eliminates
1919
the need for cluster administrators to pre-provision storage. Instead, it
20-
automatically provisions storage when it is requested by users.
20+
automatically provisions storage when users create
21+
[`PersistentVolumeClaim` objects](/docs/concepts/storage/persistent-volumes/).
2122

2223
<!-- body -->
2324

@@ -131,4 +132,3 @@ Zones in a Region. Single-Zone storage backends should be provisioned in the Zon
131132
Pods are scheduled. This can be accomplished by setting the
132133
[Volume Binding Mode](/docs/concepts/storage/storage-classes/#volume-binding-mode).
133134

134-

content/en/docs/concepts/workloads/controllers/statefulset.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ that provides a set of stateless replicas.
4747
## Limitations
4848

4949
* The storage for a given Pod must either be provisioned by a
50-
[PersistentVolume Provisioner](https://github.com/kubernetes/examples/tree/master/staging/persistent-volume-provisioning/README.md)
51-
based on the requested `storage class`, or pre-provisioned by an admin.
50+
[PersistentVolume Provisioner](/docs/concepts/storage/dynamic-provisioning/) ([examples here](https://github.com/kubernetes/examples/tree/master/staging/persistent-volume-provisioning/README.md))
51+
based on the requested _storage class_, or pre-provisioned by an admin.
5252
* Deleting and/or scaling a StatefulSet down will *not* delete the volumes associated with the
5353
StatefulSet. This is done to ensure data safety, which is generally more valuable than an
5454
automatic purge of all related StatefulSet resources.
@@ -144,10 +144,14 @@ validation error during StatefulSet creation.
144144

145145
### Volume Claim Templates
146146

147-
You can set the `.spec.volumeClaimTemplates` which can provide stable storage using
148-
[PersistentVolumes](/docs/concepts/storage/persistent-volumes/) provisioned by a PersistentVolume
149-
Provisioner.
147+
You can set the `.spec.volumeClaimTemplates` field to create a
148+
[PersistentVolumeClaim](/docs/concepts/storage/persistent-volumes/).
149+
This will provide stable storage to the StatefulSet if either
150150

151+
* The StorageClass specified for the volume claim is set up to use [dynamic
152+
provisioning](/docs/concepts/storage/dynamic-provisioning/), or
153+
* The cluster already contains a PersistentVolume with the correct StorageClass
154+
and sufficient available storage space.
151155

152156
### Minimum ready seconds
153157

@@ -491,5 +495,4 @@ the `.spec.replicas` field automatically.
491495
Read the {{< api-reference page="workload-resources/stateful-set-v1" >}}
492496
object definition to understand the API for stateful sets.
493497
* Read about [PodDisruptionBudget](/docs/concepts/workloads/pods/disruptions/) and how
494-
you can use it to manage application availability during disruptions.
495-
498+
you can use it to manage application availability during disruptions.

0 commit comments

Comments
 (0)