Explains that PVCs work if there's dynamic provisioning or pre-existing volumes.

pull/45373/head
Jacob Keller 2024-02-27 12:11:30 -08:00
parent 65b7657fd8
commit e86710dbb5
2 changed files with 11 additions and 9 deletions

View File

@ -17,7 +17,8 @@ calls to their cloud or storage provider to create new storage volumes, and
then create [`PersistentVolume` objects](/docs/concepts/storage/persistent-volumes/)
to represent them in Kubernetes. The dynamic provisioning feature eliminates
the need for cluster administrators to pre-provision storage. Instead, it
automatically provisions storage when it is requested by users.
automatically provisions storage when users create
[`PersistentVolumeClaim` objects](/docs/concepts/storage/persistent-volumes/).
<!-- body -->
@ -131,4 +132,3 @@ Zones in a Region. Single-Zone storage backends should be provisioned in the Zon
Pods are scheduled. This can be accomplished by setting the
[Volume Binding Mode](/docs/concepts/storage/storage-classes/#volume-binding-mode).

View File

@ -44,7 +44,7 @@ that provides a set of stateless replicas.
## Limitations
* The storage for a given Pod must either be provisioned by a
[PersistentVolume Provisioner](https://github.com/kubernetes/examples/tree/master/staging/persistent-volume-provisioning/README.md)
[PersistentVolume Provisioner](/docs/concepts/storage/dynamic-provisioning/) ([examples here](https://github.com/kubernetes/examples/tree/master/staging/persistent-volume-provisioning/README.md))
based on the requested `storage class`, or pre-provisioned by an admin.
* Deleting and/or scaling a StatefulSet down will *not* delete the volumes associated with the
StatefulSet. This is done to ensure data safety, which is generally more valuable than an
@ -141,10 +141,13 @@ validation error during StatefulSet creation.
### Volume Claim Templates
You can set the `.spec.volumeClaimTemplates` which can provide stable storage using
[PersistentVolumes](/docs/concepts/storage/persistent-volumes/) provisioned by a PersistentVolume
Provisioner.
You can set the `.spec.volumeClaimTemplates` field to create a
[PersistentVolumeClaim](/docs/concepts/storage/persistent-volumes/).
This will provide stable storage to the StatefulSet if either
* The specified `storage class` is set up to use [dynamic
provisioning](/docs/concepts/storage/dynamic-provisioning/), or
* The cluster already contains a PersistentVolume with the correct `storage class`
and sufficient available storage space.
### Minimum ready seconds
@ -488,5 +491,4 @@ the `.spec.replicas` field automatically.
Read the {{< api-reference page="workload-resources/stateful-set-v1" >}}
object definition to understand the API for stateful sets.
* Read about [PodDisruptionBudget](/docs/concepts/workloads/pods/disruptions/) and how
you can use it to manage application availability during disruptions.
you can use it to manage application availability during disruptions.