Skip to content

Commit eede69b

Browse files
committed
Add additional questions to the Kubernetes Volumes Challenge exam
Signed-off-by: Lee Calcote <[email protected]>
1 parent 5da8249 commit eede69b

File tree

1 file changed

+200
-0
lines changed
  • content/challenges/3e2f9c82-1a4c-4781-adf9-99ec22cd994e/how-to -add-volumes-to-kubernetes-clusters

1 file changed

+200
-0
lines changed

content/challenges/3e2f9c82-1a4c-4781-adf9-99ec22cd994e/how-to -add-volumes-to-kubernetes-clusters/exam.md

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,204 @@ questions:
6565
is_correct: true
6666
- id: "d"
6767
text: "The image used by the container"
68+
69+
- id: "q5"
70+
text: "What is the primary purpose of a PersistentVolumeClaim (PVC) in a Kubernetes cluster?"
71+
type: "single-answer"
72+
marks: 2
73+
options:
74+
- id: "o1"
75+
text: "To manage network policies"
76+
is_correct: false
77+
- id: "o2"
78+
text: "To create and access persistent storage"
79+
is_correct: true
80+
- id: "o3"
81+
text: "To configure load balancers"
82+
is_correct: false
83+
- id: "o4"
84+
text: "To deploy container images"
85+
is_correct: false
86+
correct_answer: "o2"
87+
88+
- id: "q6"
89+
text: "Which Kubernetes command-line tool is used to create and manage volumes in a cluster?"
90+
type: "single-answer"
91+
marks: 1
92+
options:
93+
- id: "o1"
94+
text: "kubeadm"
95+
is_correct: false
96+
- id: "o2"
97+
text: "kubectl"
98+
is_correct: true
99+
- id: "o3"
100+
text: "kubelet"
101+
is_correct: false
102+
- id: "o4"
103+
text: "kubectx"
104+
is_correct: false
105+
correct_answer: "o2"
106+
107+
- id: "q7"
108+
text: "Which of the following are valid `accessModes` for DigitalOcean volumes in a Kubernetes cluster? (Select all that apply)"
109+
type: "multiple-answers"
110+
marks: 3
111+
multiple_answers: true
112+
options:
113+
- id: "o1"
114+
text: "ReadWriteOnce"
115+
is_correct: true
116+
- id: "o2"
117+
text: "ReadOnlyMany"
118+
is_correct: false
119+
- id: "o3"
120+
text: "ReadWriteMany"
121+
is_correct: false
122+
- id: "o4"
123+
text: "WriteOnlyOnce"
124+
is_correct: false
125+
correct_answer: "o1"
126+
127+
- id: "q8"
128+
text: "What happens if you delete a deployment in Kubernetes without removing its associated PVCs? Will the data in your volume be **preserved** or **deleted**? (Instructions: Provide a brief explanation, including one and only one of the bold keywords.)"
129+
type: "short-answer"
130+
marks: 2
131+
#correct_answer: "The PVCs remain and must be manually deleted using `kubectl delete pvc`."
132+
correct_answer: "preserved"
133+
134+
- id: "q9"
135+
text: "Explain the role of a `StatefulSet` in managing volumes for pods in a Kubernetes cluster."
136+
type: "essay"
137+
marks: 5
138+
correct_answer: "A StatefulSet ensures stable, unique network identifiers and persistent storage for pods, making it ideal for applications requiring consistent data persistence. It manages the lifecycle of pods and their associated volumes, ensuring that each pod retains its identity and storage (via PVCs) even after restarts or rescheduling. In the context of volumes, a StatefulSet uses `volumeClaimTemplates` to automatically create and associate PVCs with each pod, simplifying the process of provisioning persistent storage."
139+
140+
- id: "q10"
141+
text: "Which storage class is specified in the example configuration for a DigitalOcean volume?"
142+
type: "single-answer"
143+
marks: 1
144+
options:
145+
- id: "o1"
146+
text: "do-block-storage"
147+
is_correct: true
148+
- id: "o2"
149+
text: "standard"
150+
is_correct: false
151+
- id: "o3"
152+
text: "premium"
153+
is_correct: false
154+
- id: "o4"
155+
text: "local-storage"
156+
is_correct: false
157+
correct_answer: "o1"
158+
159+
- id: "q11"
160+
text: "What is the valid range for the storage size of a DigitalOcean volume in a Kubernetes cluster?"
161+
type: "short-answer"
162+
marks: 2
163+
correct_answer: "1 GB to 10,000 GB"
164+
165+
- id: "q12"
166+
text: "Which of the following components in the example `StatefulSet` configuration mounts the volume at `/data`? (Select all that apply)"
167+
type: "multiple-answers"
168+
marks: 3
169+
multiple_answers: true
170+
options:
171+
- id: "o1"
172+
text: "volumeMounts"
173+
is_correct: true
174+
- id: "o2"
175+
text: "volumeClaimTemplates"
176+
is_correct: false
177+
- id: "o3"
178+
text: "spec.template.spec.containers"
179+
is_correct: true
180+
- id: "o4"
181+
text: "serviceName"
182+
is_correct: false
183+
correct_answer: "o1,o3"
184+
185+
- id: "q13"
186+
text: "What command can you use to resize a volume by editing its PVC?"
187+
type: "short-answer"
188+
marks: 2
189+
correct_answer: "kubectl edit pvc <pvc-name>"
190+
191+
- id: "q14"
192+
text: "Why might a PVC deletion stall or fail in a Kubernetes cluster?"
193+
type: "short-answer"
194+
marks: 5
195+
correct_answer: "fail"
196+
#correct_answer: "A PVC deletion may stall or fail if the associated volume is deleted manually before the PVC API object is removed using `kubectl`. This creates an inconsistent state where the PVC is still referenced but the underlying volume no longer exists. To resolve this, you can list volume attachments with `kubectl get volumeattachments`, describe the attachment with `kubectl describe volumeattachments <volume-name>`, edit it to remove the `external-attacher` finalizer, and then delete the PVC with `kubectl delete pvc <pvc-name>`."
197+
198+
- id: "q15"
199+
text: "Which container image is used in the example `StatefulSet` configuration?"
200+
type: "single-answer"
201+
marks: 1
202+
options:
203+
- id: "o1"
204+
text: "nginx"
205+
is_correct: false
206+
- id: "o2"
207+
text: "busybox"
208+
is_correct: true
209+
- id: "o3"
210+
text: "postgres"
211+
is_correct: false
212+
- id: "o4"
213+
text: "redis"
214+
is_correct: false
215+
correct_answer: "o2"
216+
217+
- id: "q16"
218+
text: "What is the default filesystem owner of a volume in DigitalOcean Kubernetes?"
219+
type: "short-answer"
220+
marks: 2
221+
correct_answer: "root"
222+
223+
- id: "q17"
224+
text: "Which of the following `mountOptions` are supported by DigitalOcean Kubernetes for setting volume permissions? (Select all that apply)"
225+
type: "multiple-answers"
226+
marks: 3
227+
multiple_answers: true
228+
options:
229+
- id: "o1"
230+
text: "dir_mode=0777"
231+
is_correct: false
232+
- id: "o2"
233+
text: "file_mode=0777"
234+
is_correct: false
235+
- id: "o3"
236+
text: "chmod 777 via initContainer"
237+
is_correct: true
238+
- id: "o4"
239+
text: "chown via securityContext"
240+
is_correct: true
241+
correct_answer: "o3,o4"
242+
243+
- id: "q18"
244+
text: "What command lists the persistent volumes associated with a Kubernetes cluster?"
245+
type: "short-answer"
246+
marks: 2
247+
correct_answer: "kubectl get pv"
248+
249+
250+
- id: "q19"
251+
text: "What is the consequence of modifying cluster resources like volumes directly in the DigitalOcean Control Panel?"
252+
type: "single-answer"
253+
marks: 2
254+
options:
255+
- id: "o1"
256+
text: "It improves cluster performance"
257+
is_correct: false
258+
- id: "o2"
259+
text: "It may render resources unusable or trigger replacement"
260+
is_correct: true
261+
- id: "o3"
262+
text: "It automatically updates the PVC"
263+
is_correct: false
264+
- id: "o4"
265+
text: "It has no impact on the cluster"
266+
is_correct: false
267+
correct_answer: "o2"
68268
---

0 commit comments

Comments
 (0)