exam questions

Exam CKA All Questions

View all questions & answers for the CKA exam

Exam CKA topic 1 question 11 discussion

Actual exam question from CNCF's CKA
Question #: 11
Topic #: 1
[All CKA Questions]

SIMULATION -


Task -
Create a persistent volume with name app-data, of capacity 2Gi and access mode ReadOnlyMany. The type of volume is hostPath and its location is /srv/app- data.

Show Suggested Answer Hide Answer
Suggested Answer:






Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
pentium2000
Highly Voted 2 years ago
apiVersion: v1 kind: PersistentVolume metadata: name: app-data spec: capacity: storage: 2Gi accessModes: - ReadOnlyMany hostPath: path: "/srv/app-data"
upvoted 22 times
...
noahsark
Most Recent 1 month, 3 weeks ago
killer_sh_lab: vim app-data.yml apiVersion: v1 kind: PersistentVolume metadata: name: app-data spec: capacity: storage: 2Gi accessModes: - ReadOnlyMany hostPath: path: "/srv/app-data" k get pv k apply -f app-data.yml
upvoted 1 times
...
Archanakaviya
2 months, 3 weeks ago
apiVersion: v1 kind: PersistentVolume metadata: name: app-data spec: capacity: storage: 2Gi accessModes: - ReadOnlyMany hostPath: path: /srv/app-data
upvoted 1 times
...
BABU97
10 months ago
apiVersion: v1 2 kind: PersistentVolume 3 metadata: 4 name: app-data 5 spec: 6 capacity: 7 storage: 2Gi 8 accessModes: 9 - ReadWriteMany 10 hostPath: 11 path: "/srv/app-data" ~
upvoted 2 times
...
fc146fc
10 months, 2 weeks ago
Vi app-data.yaml apiVersion: v1 kind: PersistentVolume metadata: name: app-data spec: capacity: storage: 2Gi accessModes: - ReadWriteMany hostPath: path: “/srv/app- data” kubectl create -f app-data.yaml
upvoted 1 times
shure4shure
10 months, 1 week ago
The question asked for the Access Mode to be ReadOnlyMany
upvoted 2 times
...
...
bajideace
1 year ago
vi pv.yaml apiVersion: v1 kind: PersistentVolume metadata: name: app-date spec: capacity: storage: 2Gi accessModes: - ReadOnlyMany hostPath: path: "/srv/app- data" k create -f pv.yaml https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolume
upvoted 1 times
...
namesgeo
1 year, 1 month ago
https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolume vi pv.yaml -------------- apiVersion: v1 kind: PersistentVolume metadata: name: app-data labels: type: local spec: capacity: storage: 2Gi accessModes: - ReadOnlyMany hostPath: path: "/srv/app-data" ------------------ kubectl create -f pv.yaml
upvoted 2 times
...
Samm1
1 year, 4 months ago
From my view: vi pv1.yaml apiVersion: v1 kind: PersistentVolume metadata: name: app-data spec: capacity: storage: 2Gi volumeMode: Filesystem accessModes: - ReadOnlyMany persistentVolumeReclaimPolicy: Recycle hostPath: path: srv/app- data type: Directory kubectl apply -f pv1.yaml kubectl get pv
upvoted 1 times
...
tetural
2 years ago
https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/ https://raw.githubusercontent.com/kubernetes/website/main/content/en/examples/pods/storage/pv-volume.yaml
upvoted 1 times
...
amehim
2 years ago
Yes @spinmc, you're correct. It should be ROX.
upvoted 2 times
...
spinmc
2 years, 1 month ago
accessModes is wrong in the solution. the ask is to set it ReadOnlyMany
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago