-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Expand file tree
/
Copy path01-storage-class.yml
More file actions
44 lines (40 loc) · 2.27 KB
/
Copy path01-storage-class.yml
File metadata and controls
44 lines (40 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: managed-premium-retain-sc
provisioner: kubernetes.io/azure-disk
reclaimPolicy: Retain # Default is Delete, recommended is retain
volumeBindingMode: WaitForFirstConsumer # Default is Immediate, recommended is WaitForFirstConsumer
allowVolumeExpansion: true
parameters:
storageaccounttype: Standard_LRS # or we can use Standard_LRS ,Premium_LRS
kind: Managed # Default is shared, recommended is Managed
# Additional Reference
# https://kubernetes.io/docs/concepts/storage/storage-classes/#azure-disk
##############################################################################
# Note - 1:
#volumeBindingMode: Immediate - This setting implies that the PersistentVolumecreation,
#followed with the storage medium (Azure Disk in this case) provisioning is triggered as
#soon as the PersistentVolumeClaim is created.
# Note - 2:
# volumeBindingMode: WaitForFirstConsumer
#By default, the Immediate mode indicates that volume binding and dynamic provisioning
#occurs once the PersistentVolumeClaim is created. For storage backends that are
#topology-constrained and not globally accessible from all Nodes in the cluster,
#PersistentVolumes will be bound or provisioned without knowledge of the Pod's scheduling
#requirements. This may result in unschedulable Pods.
#A cluster administrator can address this issue by specifying the WaitForFirstConsumer
#mode which will delay the binding and provisioning of a PersistentVolume until a
#Pod using the PersistentVolumeClaim is created. PersistentVolumes will be selected or
#provisioned conforming to the topology that is specified by the Pod's scheduling
#constraints.
##############################################################################
# Note - 3:
#reclaimPolicy: Delete - With this setting, as soon as a PersistentVolumeClaim is deleted,
#it also triggers the removal of the corresponding PersistentVolume along with the
#Azure Disk.
#We will be surprised provided if we intended to retain that data as backup.
# reclaimPolicy: retain - Disk is retained even when PVC is deleted - Recommended Option
# Note - 4:
# Both reclaimPolicy: Delete and volumeBindingMode: Immediate are default settings
##############################################################################