CKA 2025 MOCK Q-01 Storage Class
🔶 Question 1:
Task:
Create a StorageClass named csi-retain-sc
with the following specifications:
-
Use provisioner:
csi-driver.example-vendor.example
-
Set this class as the default
-
Set
reclaimPolicy
toRetain
-
Allow volume expansion
-
Add mount option
discard
-
Use
WaitForFirstConsumer
as the volumeBindingMode
✅ Save this configuration to a file named sc-default-retain.yaml
and apply it.
🔶 Question 2:
Task:
You already have a default StorageClass named old-default
.
You created a new class fast-csi
(already applied) but forgot to mark it as default.
-
Patch
fast-csi
to be the default StorageClass. -
Remove the default annotation from
old-default
.
🔶 Question 3:
Task:
Create a StorageClass named perf-csi-sc
using the same csi-driver.example-vendor.example
provisioner but do not make it default.
It must:
-
Allow volume expansion
-
Include the parameter
guaranteedReadWriteLatency: "true"
-
Use
Immediate
volumeBindingMode -
Use
Delete
as reclaimPolicy
✅ Save as sc-perf.yaml
and apply.
🔶 Question 4:
Task:
Run a command to identify which StorageClass is currently set as default.
✅ Provide the kubectl
command output showing the correct storageclass.kubernetes.io/is-default-class
annotation.
🔶 Question 5:
1. Create a new StorageClass named `cluster-one` with:
- `rancher.io/local-path'
- `volumeBindingMode: WaitForFirstConsumer`
2. Mark `cluster-one` as the default StorageClass.
**do not** modify the PVC manifest or any existing Deployments.
🔶 Question 1: Scenario not required
🔶 Question 2: Change Default StorageClass
✅ Scenario Setup
We'll simulate two StorageClasses:
-
old-default
(currently default) -
fast-csi
(created but not default)
Apply these two YAMLs:
🔧 old-default.yaml
🔧 fast-csi.yaml
Apply both:
Solution
✅ Step 1: Patch fast-csi
to become default
✅ Step 2: Remove is-default-class
from old-default
✅ Step 3: Confirm the result
🔶 Question 3: Scenario not required
🔶 Question 4: Scenario not required
Comments
Post a Comment