Question 1 — Reading and reasoning
You are given the following CRD:
yaml
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: accesspolicies.security.example.com
spec:
group: security.example.com
scope: Namespaced
names:
plural: accesspolicies
singular: accesspolicy
kind: AccessPolicy
versions:
- name: v1
served: true
storage: trueTasks:
- Write the correct
apiVersionfor a Custom Resource - Write the correct
kubectl getcommand - State whether a namespace is required when creating a CR
- State the correct CRD name format
Question 2 — Fix the broken CRD
The following CRD fails to apply:
yaml
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: policies.security.example.com
spec:
group: security.example.com
scope: Namespaced
names:
plural: accesspolicies
singular: accesspolicy
kind: AccessPolicy
versions:
- name: v1
served: true
storage: trueTasks:
- Identify what is wrong
- Fix the CRD
- Explain why Kubernetes rejects the original
Question 3 — FeatureToggle CRD
Create a namespaced CRD with:
Kind:
FeatureToggleGroup:
config.example.comVersion:
v1Plural:
featuretogglesSpec fields:
enabled(boolean)description(string)
Then create a Custom Resource:
- Name:
new-ui - Namespace:
default - enabled:
true
Question 4 — Schema validation failure
You apply the following CR:
yaml
apiVersion: config.example.com/v1
kind: FeatureToggle
metadata:
name: broken-toggle
namespace: default
spec:
enabled: "true"Tasks:
- Explain why this CR is rejected
- Identify the exact field causing the issue
- State the correct value type
Question 5 — kubectl explain
Assume the CRD featuretoggles.config.example.com exists.
Tasks:
- Inspect the Custom Resource using
kubectl explain - Inspect the
spec.enabledfield - Explain why this is useful in the exam
Question 6 — Cluster vs Namespaced trap
You are given a CRD with:
yaml
spec:
scope: ClusterBut the CR YAML contains:
yaml
metadata:
namespace: defaultTasks:
- State what will go wrong
- Explain how to fix it
- Identify which object is incorrect
Question 7 — Fast recognition drill
Given:
text
CRD name: backups.storage.example.comAnswer:
- Group
- Plural
- Kind
kubectl getcommand