diff --git a/docs/tutorials/getting-started/cluster-interactive.html b/docs/tutorials/getting-started/cluster-interactive.html index 6af54cb0e6..8f74bab8b5 100644 --- a/docs/tutorials/getting-started/cluster-interactive.html +++ b/docs/tutorials/getting-started/cluster-interactive.html @@ -32,12 +32,6 @@ - - diff --git a/docs/tutorials/getting-started/cluster-intro.html b/docs/tutorials/getting-started/cluster-intro.html index c3a479cabd..a3dafff437 100644 --- a/docs/tutorials/getting-started/cluster-intro.html +++ b/docs/tutorials/getting-started/cluster-intro.html @@ -96,12 +96,6 @@ - - diff --git a/docs/tutorials/getting-started/create-cluster.html b/docs/tutorials/getting-started/create-cluster.html index 29135e7a9f..42c22f90e8 100644 --- a/docs/tutorials/getting-started/create-cluster.html +++ b/docs/tutorials/getting-started/create-cluster.html @@ -39,12 +39,6 @@ - - diff --git a/docs/tutorials/getting-started/deploy-app.html b/docs/tutorials/getting-started/deploy-app.html index 2267fae038..e60081b601 100644 --- a/docs/tutorials/getting-started/deploy-app.html +++ b/docs/tutorials/getting-started/deploy-app.html @@ -44,12 +44,6 @@ - - diff --git a/docs/tutorials/getting-started/deploy-interactive.html b/docs/tutorials/getting-started/deploy-interactive.html index 49d8c5c96e..6525b21c4c 100644 --- a/docs/tutorials/getting-started/deploy-interactive.html +++ b/docs/tutorials/getting-started/deploy-interactive.html @@ -35,12 +35,6 @@ - - diff --git a/docs/tutorials/getting-started/deploy-intro.html b/docs/tutorials/getting-started/deploy-intro.html index fd6adf0804..cd72f424b8 100644 --- a/docs/tutorials/getting-started/deploy-intro.html +++ b/docs/tutorials/getting-started/deploy-intro.html @@ -98,12 +98,6 @@ - - diff --git a/docs/tutorials/getting-started/explore-app.html b/docs/tutorials/getting-started/explore-app.html index f3ae4ead91..bc18696e81 100644 --- a/docs/tutorials/getting-started/explore-app.html +++ b/docs/tutorials/getting-started/explore-app.html @@ -45,12 +45,6 @@ - - diff --git a/docs/tutorials/getting-started/explore-interactive.html b/docs/tutorials/getting-started/explore-interactive.html index 812ced442f..5b82635398 100644 --- a/docs/tutorials/getting-started/explore-interactive.html +++ b/docs/tutorials/getting-started/explore-interactive.html @@ -35,12 +35,6 @@ - - diff --git a/docs/tutorials/getting-started/explore-intro.html b/docs/tutorials/getting-started/explore-intro.html index 4b6f13e165..df9cd7c305 100644 --- a/docs/tutorials/getting-started/explore-intro.html +++ b/docs/tutorials/getting-started/explore-intro.html @@ -132,12 +132,6 @@ - - diff --git a/docs/tutorials/getting-started/expose-app.html b/docs/tutorials/getting-started/expose-app.html index 593f34794e..04e8300b91 100644 --- a/docs/tutorials/getting-started/expose-app.html +++ b/docs/tutorials/getting-started/expose-app.html @@ -46,12 +46,6 @@ - - diff --git a/docs/tutorials/getting-started/expose-interactive.html b/docs/tutorials/getting-started/expose-interactive.html index d2d61e87c4..04d3bc3f53 100644 --- a/docs/tutorials/getting-started/expose-interactive.html +++ b/docs/tutorials/getting-started/expose-interactive.html @@ -33,12 +33,6 @@ - - diff --git a/docs/tutorials/getting-started/expose-intro.html b/docs/tutorials/getting-started/expose-intro.html index 9f5bf74b83..2178a7dd25 100644 --- a/docs/tutorials/getting-started/expose-intro.html +++ b/docs/tutorials/getting-started/expose-intro.html @@ -126,12 +126,6 @@ - - diff --git a/docs/tutorials/getting-started/index.html b/docs/tutorials/getting-started/index.html index 9762cae49a..932bd79363 100644 --- a/docs/tutorials/getting-started/index.html +++ b/docs/tutorials/getting-started/index.html @@ -89,12 +89,6 @@ - - diff --git a/docs/tutorials/getting-started/scale-app.html b/docs/tutorials/getting-started/scale-app.html index 9a4a1406db..4996dd3cd4 100644 --- a/docs/tutorials/getting-started/scale-app.html +++ b/docs/tutorials/getting-started/scale-app.html @@ -44,12 +44,6 @@ - - diff --git a/docs/tutorials/getting-started/scale-interactive.html b/docs/tutorials/getting-started/scale-interactive.html index ea0de03c48..9ab0d10557 100644 --- a/docs/tutorials/getting-started/scale-interactive.html +++ b/docs/tutorials/getting-started/scale-interactive.html @@ -33,12 +33,6 @@ - - diff --git a/docs/tutorials/getting-started/scale-intro.html b/docs/tutorials/getting-started/scale-intro.html index b36757d755..b06e574c7e 100644 --- a/docs/tutorials/getting-started/scale-intro.html +++ b/docs/tutorials/getting-started/scale-intro.html @@ -110,12 +110,6 @@ - - diff --git a/docs/tutorials/getting-started/update-app.html b/docs/tutorials/getting-started/update-app.html index d5d9f05c95..6ce6600d0e 100644 --- a/docs/tutorials/getting-started/update-app.html +++ b/docs/tutorials/getting-started/update-app.html @@ -44,12 +44,6 @@ - - diff --git a/docs/tutorials/getting-started/update-interactive.html b/docs/tutorials/getting-started/update-interactive.html index 13da0fc43d..5b399f06dc 100644 --- a/docs/tutorials/getting-started/update-interactive.html +++ b/docs/tutorials/getting-started/update-interactive.html @@ -28,12 +28,6 @@ - - diff --git a/docs/tutorials/getting-started/update-intro.html b/docs/tutorials/getting-started/update-intro.html index 0d3a3b2cfe..c6f65cfa58 100644 --- a/docs/tutorials/getting-started/update-intro.html +++ b/docs/tutorials/getting-started/update-intro.html @@ -125,12 +125,6 @@ - - diff --git a/docs/user-guide/persistent-volumes/index.md b/docs/user-guide/persistent-volumes/index.md index dfc9aa5b5a..5232f068cd 100644 --- a/docs/user-guide/persistent-volumes/index.md +++ b/docs/user-guide/persistent-volumes/index.md @@ -399,3 +399,27 @@ parameters: * `type`: [VolumeType](http://docs.openstack.org/admin-guide/dashboard-manage-volumes.html) created in Cinder. Default is empty. * `availability`: Availability Zone. Default is empty. + +## Writing Portable Configuration + +If you're writing configuration templates or examples that run on a wide range of clusters +and need persistent storage, we recommend that you use the following pattern: + +- Do include PersistentVolumeClaim objects in your bundle of config (alongside Deployments, ConfigMaps, etc). +- Do not include PersistentVolume objects in the config, since the user instantiating the config may not have + permission to create PersistentVolumes. +- Give the user the option of providing a storage class name when instantating the template. + - If the user provides a storage class name, and the cluster is version 1.4 or newer, put that value into the `volume.beta.kubernetes.io/storage-class` annotation of the PVC. + This will cause the PVC to match the right storage class if the cluster has StorageClasses enabled by the admin. + - If the user does not provide a storage class name or the cluster is version 1.3, then instead put a `volume.alpha.kubernetes.io/storage-class: default` annotation on the PVC. + - This will cause a PV to be automatically provisioned for the user with sane default characteristics on some clusters. + - Despite the word `alpha` in the name, the code behind this annotation has `beta` level support. + - Do not use `volume.beta.kubernetes.io/storage-class:` with any value including the empty string since it will prevent DefaultStorageClass admission controller + from running if enabled. +- In your tooling, do watch for PVCs that are not getting bound after some time and surface this to the user, as this may indicate that the cluster has no dynamic + storage support (in which case the user should create a matching PV) or the cluster has no storage system (in which case the user cannot deploy config requiring + PVCs). +- In the future, we expect most clusters to have `DefaultStorageClass` enabled, and to have some form of storage available. However, there may not be any + storage class names which work on all clusters, so continue to not set one by default. + At some point, the alpha annotation will cease to have meaning, but the unset `storageClass` field on the PVC + will have the desired effect.