Practice Test - Storage Class
- Take me to Practice Test
Solution
-
Check the Solution
0 -
Check the Solution
2 -
Check the Solution
local-storage -
Check the Solution
WaitForFirstConsumer -
Check the Solution
portworx-volume -
Check the Solution
NO -
Check the Solution
apiVersion: v1 kind: PersistentVolumeClaim metadata: name: local-pvc spec: accessModes: - ReadWriteOnce resources: requests: storage: 500Mi storageClassName: local-storage -
Check the Solution
Pending -
Check the Solution
A Pod consuming the volume in not scheduled -
Check the Solution
The Storage Class called local-storage makes use of VolumeBindingMode set to WaitForFirstConsumer. This will delay the binding and provisioning of a PersistentVolume until a Pod using the PersistentVolumeClaim is created. -
Check the Solution
apiVersion: v1 kind: Pod metadata: name: nginx labels: name: nginx spec: containers: - name: nginx image: nginx:alpine volumeMounts: - name: local-persistent-storage mountPath: /var/www/html volumes: - name: local-persistent-storage persistentVolumeClaim: claimName: local-pvc -
Check the Solution
apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: delayed-volume-sc provisioner: kubernetes.io/no-provisioner volumeBindingMode: WaitForFirstConsumer