Certified Kubernetes Administrator (CKA) · Free practice question 7 of 12
Raw block volumes with volumeMode
A database at Kirkby Data wants a raw block device instead of a mounted file system from its PVC. Which fields are needed?
- A.volumeMode: Block on the PVC, and volumeDevices in the container
- B.volumeMode: Filesystem on the PVC, and mountPath: /dev/xvdb
- C.fsType: none on the PVC, and readOnly: true in the container
- D.accessModes: [Block] on the PVC, and volumeMounts in the container
Show answer and explanation
Correct answer: A. volumeMode: Block on the PVC, and volumeDevices in the container
Why: Setting volumeMode: Block on the PVC requests a raw device, and the container then lists the volume under volumeDevices with a devicePath instead of volumeMounts. Filesystem is the default mode and gives a mounted file system, Block is not an access mode, and fsType is a storage parameter rather than a PVC field.
More free Certified Kubernetes Administrator (CKA) questions
- Drain flags for DaemonSets and emptyDir
- CronJob concurrencyPolicy Forbid
- Listing cluster-scoped API resources
- Setting the default namespace in a context
- Session affinity by client IP
- Pod dnsPolicy Default versus ClusterFirst
- Debugging a node with kubectl debug
- CreateContainerConfigError from missing ConfigMap
- Approving a client CertificateSigningRequest
- NetworkPolicy ipBlock with except
- Restoring a PVC from a VolumeSnapshot