Skip to content

Commit 4e3523c

Browse files
committed
fix inconsistency in documentation of default storageclass
1 parent ffe1d67 commit 4e3523c

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

content/en/docs/reference/access-authn-authz/admission-controllers.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,12 @@ and automatically adds a default storage class to them.
200200
This way, users that do not request any special storage class do not need to care about them at all and they
201201
will get the default one.
202202

203-
This admission controller does not do anything when no default storage class is configured. When more than one storage
204-
class is marked as default, it rejects any creation of `PersistentVolumeClaim` with an error and an administrator
205-
must revisit their `StorageClass` objects and mark only one as default.
203+
This admission controller does nothing when no default `StorageClass` exists. When more than one storage
204+
class is marked as default, and you then create a `PersistentVolumeClaim` with no `storageClassName` set,
205+
Kubernetes uses the most recently created default `StorageClass`.
206+
When a `PersistentVolumeClaim` is created with a specified `volumeName`, it remains in a pending state
207+
if the static volume's `storageClassName` does not match the `storageClassName` on the `PersistentVolumeClaim`
208+
after any default StorageClass is applied to it.
206209
This admission controller ignores any `PersistentVolumeClaim` updates; it acts only on creation.
207210

208211
See [persistent volume](/docs/concepts/storage/persistent-volumes/) documentation about persistent volume claims and

content/en/docs/tasks/administer-cluster/change-default-storage-class.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,13 @@ for details about addon manager and how to disable individual addons.
7373
kubectl patch storageclass gold -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
7474
```
7575

76-
Please note that at most one StorageClass can be marked as default. If two
77-
or more of them are marked as default, a `PersistentVolumeClaim` without
78-
`storageClassName` explicitly specified cannot be created.
76+
Please note you can have multiple `StorageClass` marked as default. If more
77+
than one `StorageClass` is marked as default, a `PersistentVolumeClaim` without
78+
an explicitly defined `storageClassName` will be created using the most recently
79+
created default `StorageClass`.
80+
When a `PersistentVolumeClaim` is created with a specified `volumeName`, it remains
81+
in a pending state if the static volume's `storageClassName` does not match the
82+
`StorageClass` on the `PersistentVolumeClaim`.
7983

8084
1. Verify that your chosen StorageClass is default:
8185

0 commit comments

Comments
 (0)