Kubernetes Storage Class Manifest: Difference between revisions
Jump to navigation
Jump to search
(10 intermediate revisions by the same user not shown) | |||
Line 7: | Line 7: | ||
[[Kubernetes_Manifest_Metadata#Overview|metadata]]: | [[Kubernetes_Manifest_Metadata#Overview|metadata]]: | ||
[[Kubernetes_Manifest_Metadata#name|name]]: fast | [[Kubernetes_Manifest_Metadata#name|name]]: fast | ||
annotations: | |||
<span id=default_storageclass_manifest'></span>storageclass.kubernetes.io/[[Kubernetes_Storage_Concepts#Default_Storage_Class|is-default-class]]: "true" | |||
reclaimPolicy: Delete | |||
<span id='volumeBindingMode_metadata'></span>[[#volumeBindingMode|volumeBindingMode]]: Immediate | |||
<span id='provisioner_metadata'></span>[[#provisioner|provisioner]]: kubernetes.io/aws-ebs | <span id='provisioner_metadata'></span>[[#provisioner|provisioner]]: kubernetes.io/aws-ebs | ||
parameters: | <span id='parameters_metadata'></span>[[#parameters|parameters]]: | ||
type: io1 | type: io1 | ||
zone: us-west-2 | zone: us-west-2 | ||
Line 15: | Line 19: | ||
=Elements= | =Elements= | ||
==volumeBindingMode== | |||
Valid values: | |||
* <span id=''Immediate></span>'''Immediate''' | |||
* <span id=''WaitForFirstConsumer></span>'''WaitForFirstConsumer''' - this setting instructs the [[Kubernetes_Storage_Concepts#Persistent_Volume_Controller|persistent volume controller]] to not bind immediately a persistent volume claim. Instead, the system waits until a pod that needs to use a volume is scheduled. The scheduler then chooses an appropriate local persistent volume to bind to, taking into account the pod’s other scheduling constraints and policies. This ensures that the initial volume binding is compatible with any pod resource requirements, selectors, affinity and anti-affinity policies. This is a recommended setting for storage classes that offer [[Kubernetes_Storage_Concepts#local|local volumes]]. | |||
==provisioner== | ==provisioner== | ||
[[#provisioner_metadata|provisioner]] tells Kubernetes which [[Kubernetes_Storage_Concepts#Storage_Plugins|storage plugin]] to use. | |||
==parameters== | |||
The [[#parameters_metadata|parameters]] section is for plugin-specific values, and each plugin supports its own set of values. |
Latest revision as of 17:58, 12 December 2019
Internal
Example
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: fast annotations: storageclass.kubernetes.io/is-default-class: "true" reclaimPolicy: Delete volumeBindingMode: Immediate provisioner: kubernetes.io/aws-ebs parameters: type: io1 zone: us-west-2 ipsPerGb: "10" ...
Elements
volumeBindingMode
Valid values:
- Immediate
- WaitForFirstConsumer - this setting instructs the persistent volume controller to not bind immediately a persistent volume claim. Instead, the system waits until a pod that needs to use a volume is scheduled. The scheduler then chooses an appropriate local persistent volume to bind to, taking into account the pod’s other scheduling constraints and policies. This ensures that the initial volume binding is compatible with any pod resource requirements, selectors, affinity and anti-affinity policies. This is a recommended setting for storage classes that offer local volumes.
provisioner
provisioner tells Kubernetes which storage plugin to use.
parameters
The parameters section is for plugin-specific values, and each plugin supports its own set of values.