Kubernetes Storage Class Manifest: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 23: | Line 23: | ||
Valid values: | Valid values: | ||
* '''Immediate''' | * <span id=''Immediate></span>'''Immediate''' | ||
* '''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]]. | * <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== |
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.