Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Capacity. Claims, like Pods, can request specific quantities of a resource. In this case, the request is for storage and use the same convention as PV.
  • Volume mode. Same conventions as PV.
  • Access Mode. Same conventions as PV.
  • Selector. Claims can specify a label selector to further filter the set of volumes. Only the volumes whose labels match the selector can be bound to the claim.
  • Class. A claim can request a particular class by specifying the name of a StorageClass using the attribute storageClassName. In the static provisioning, only PVs of the requested class, ones with the same storageClassName as the PVC, can be bound to the PVC. As mentioned, this parameter is not mandatory, in fact it can be set with the name of the class, it can be empty (storageClassName set equal to "") and completely missing. What happens if the parameter is absent? The system behavior depends on whether the DefaultStorageClass admission plugin is:
    • ON. The administrator may specify a default SC. All PVCs that have no storageClassName can be bound only to PVs of that default. Specifying a default SC is done by setting the annotation storageclass.kubernetes.io/is-default-class: "true" in a SC object. If the administrator does not specify a default, the cluster responds to PVC creation as if the admission plugin were turned off. If more than one default is specified, the admission plugin forbids the creation of all PVCs.
    • OFF.  There is no notion of a default SC. All PVCs that have no storageClassName can be bound only to PVs that have no class.

To activate this plugin you need to edit the /etc/kubernetes/manifests/kube-apiserver.yaml file (the path may be different), inserting DefaultStorageClass in the specifications.

Code Block
languageyml
titlekube-apiserver
spec:
  containers:
  - command:
    - kube-apiserver
.
.
.
    - --enable-admission-plugins=NodeRestriction,DefaultStorageClass


Storage Class