Complete the code to define the kind of the Kubernetes object as PersistentVolumeClaim.
apiVersion: v1
kind: [1]
metadata:
name: my-pvcThe kind field specifies the type of Kubernetes object. For a PersistentVolumeClaim, it must be PersistentVolumeClaim.
Complete the code to specify the storage size requested in the PVC spec.
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: [1]The storage field defines the amount of storage requested. 5Gi means 5 gibibytes.
Fix the error in the accessModes list to allow only one access mode: ReadWriteOnce.
spec:
accessModes:
- [1]ReadWriteOnce means the volume can be mounted as read-write by a single node. This is a common access mode for PVCs.
Fill both blanks to specify the storage class name and the storage size in the PVC spec.
spec: storageClassName: [1] resources: requests: storage: [2]
The storageClassName defines the type of storage to use, e.g., fast-storage. The storage request defines the size, e.g., 10Gi.
Fill all three blanks to complete the PVC spec with access mode, storage class, and storage size.
spec:
accessModes:
- [1]
storageClassName: [2]
resources:
requests:
storage: [3]The PVC spec requires an access mode like ReadWriteOnce, a storage class name like fast-storage, and a storage size like 20Gi.