U.S. Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation CKA Exam - Topic 9 Question 29 Discussion

Score:7%TaskCreate a new PersistentVolumeClaim* Name: pv-volume* Class: csi-hostpath-sc* Capacity: 10MiCreate a new Pod which mounts the PersistentVolumeClaim as a volume:* Name: web-server* Image: nginx* Mount path: /usr/share/nginx/htmlConfigure the new Pod to have ReadWriteOnce access on the volume.Finally, using kubectl edit or kubectl patch expand the PersistentVolumeClaim to a capacity of 70Mi and record that change.
A) Explanation: Solution: vi pvc.yaml storageclass pvc apiVersion: v1 kind: PersistentVolumeClaim metadata: name: pv-volume spec: accessModes: - ReadWriteOnce volumeMode: Filesystem resources: requests: storage: 10Mi storageClassName: csi-hostpath-sc # vi pod-pvc.yaml apiVersion: v1 kind: Pod metadata: name: web-server spec: containers: - name: web-server image: nginx volumeMounts: - mountPath: '/usr/share/nginx/html' name: my-volume volumes: - name: my-volume persistentVolumeClaim: claimName: pv-volume # craete kubectl create -f pod-pvc.yaml #edit kubectl edit pvc pv-volume --record

Linux Foundation CKA Exam - Topic 9 Question 29 Discussion

Actual exam question for Linux Foundation's CKA exam
Question #: 29
Topic #: 9
[All CKA Questions]

Score:7%

Task

Create a new PersistentVolumeClaim

* Name: pv-volume

* Class: csi-hostpath-sc

* Capacity: 10Mi

Create a new Pod which mounts the PersistentVolumeClaim as a volume:

* Name: web-server

* Image: nginx

* Mount path: /usr/share/nginx/html

Configure the new Pod to have ReadWriteOnce access on the volume.

Finally, using kubectl edit or kubectl patch expand the PersistentVolumeClaim to a capacity of 70Mi and record that change.

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters
Gail
7 months ago
I thought we were supposed to use 20Mi as a minimum.
upvoted 0 times
...
Nilsa
8 months ago
Nice setup! Nginx is perfect for serving static content.
upvoted 0 times
...
Daren
8 months ago
Wait, why only 10Mi? Seems a bit small for a web server.
upvoted 0 times
...
Carin
8 months ago
Totally agree, using ReadWriteOnce is the way to go!
upvoted 0 times
...
Chau
8 months ago
Just created a PVC named pv-volume with 10Mi capacity.
upvoted 0 times
...
Helene
8 months ago
I feel confident about creating the PVC, but I might mix up the volume names in the Pod definition. Need to double-check that!
upvoted 0 times
...
Quentin
8 months ago
I'm a bit unsure about the exact syntax for the kubectl edit command. Did we need to specify anything else besides the PVC name?
upvoted 0 times
...
Glenn
8 months ago
I think I remember that we need to define the PersistentVolumeClaim first before creating the Pod, right?
upvoted 0 times
...
Dorthy
9 months ago
This question seems similar to the practice we did on volume mounts. I hope I can recall the access modes correctly during the exam.
upvoted 0 times
...
Shala
9 months ago
Hmm, this seems like a tricky one. I'll need to carefully consider the requirements and think through the different options.
upvoted 0 times
...
Ahmed
9 months ago
I feel pretty confident about this one. I'll work through the calculations step-by-step and review my answers to ensure I've got the right numbers for the budget.
upvoted 0 times
...

Save Cancel