0
0
Kubernetesdevops~10 mins

PersistentVolumeClaim (PVC) definition in Kubernetes - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define the kind of the Kubernetes object as PersistentVolumeClaim.

Kubernetes
apiVersion: v1
kind: [1]
metadata:
  name: my-pvc
Drag options to blanks, or click blank then click option'
AService
BPod
CDeployment
DPersistentVolumeClaim
Attempts:
3 left
💡 Hint
Common Mistakes
Using Pod or Service instead of PersistentVolumeClaim in kind.
2fill in blank
medium

Complete the code to specify the storage size requested in the PVC spec.

Kubernetes
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: [1]
Drag options to blanks, or click blank then click option'
A5Gi
B500Mi
C1Ti
D100Gi
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting units or using invalid units for storage size.
3fill in blank
hard

Fix the error in the accessModes list to allow only one access mode: ReadWriteOnce.

Kubernetes
spec:
  accessModes:
    - [1]
Drag options to blanks, or click blank then click option'
AReadWriteOnce
BReadOnlyMany
CReadWriteMany
DWriteOnce
Attempts:
3 left
💡 Hint
Common Mistakes
Using invalid access modes like WriteOnce or ReadOnlyMany when only ReadWriteOnce is allowed.
4fill in blank
hard

Fill both blanks to specify the storage class name and the storage size in the PVC spec.

Kubernetes
spec:
  storageClassName: [1]
  resources:
    requests:
      storage: [2]
Drag options to blanks, or click blank then click option'
Afast-storage
Bslow-storage
C10Gi
D1Gi
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing storage class names with storage sizes or using invalid sizes.
5fill in blank
hard

Fill all three blanks to complete the PVC spec with access mode, storage class, and storage size.

Kubernetes
spec:
  accessModes:
    - [1]
  storageClassName: [2]
  resources:
    requests:
      storage: [3]
Drag options to blanks, or click blank then click option'
AReadWriteOnce
Bfast-storage
C20Gi
DReadOnlyMany
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect access modes or mismatching storage class and size.