0
0
Kubernetesdevops~10 mins

Custom Resource Definitions (CRDs) in Kubernetes - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the API version for a CRD manifest.

Kubernetes
apiVersion: [1]
Drag options to blanks, or click blank then click option'
Aapiextensions.k8s.io/v1
Bv1
Capps/v1
Dbatch/v1
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'v1' alone without the API group.
Using 'apps/v1' which is for deployments.
Using 'batch/v1' which is for jobs.
2fill in blank
medium

Complete the code to define the kind of the custom resource in the CRD manifest.

Kubernetes
kind: [1]
Drag options to blanks, or click blank then click option'
AService
BCustomResourceDefinition
CDeployment
DPod
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Deployment' or 'Service' which are standard Kubernetes resources.
Using 'Pod' which is a basic workload resource.
3fill in blank
hard

Fix the error in the CRD spec by completing the missing field for the resource names.

Kubernetes
spec:
  names:
    plural: [1]
Drag options to blanks, or click blank then click option'
AMyResources
BMyResource
Cmyresource
Dmyresources
Attempts:
3 left
💡 Hint
Common Mistakes
Using singular form instead of plural.
Using capital letters in the plural field.
4fill in blank
hard

Fill both blanks to define the scope and the kind of the custom resource in the CRD spec.

Kubernetes
spec:
  scope: [1]
  names:
    kind: [2]
Drag options to blanks, or click blank then click option'
ANamespaced
BCluster
CMyResource
DMyResources
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up scope values.
Using plural form for kind.
5fill in blank
hard

Fill all three blanks to complete the CRD version definition with name, served, and storage fields.

Kubernetes
spec:
  versions:
  - name: [1]
    served: [2]
    storage: [3]
Drag options to blanks, or click blank then click option'
Av1alpha1
Btrue
Cfalse
Dv1
Attempts:
3 left
💡 Hint
Common Mistakes
Using alpha versions for production CRDs.
Setting storage to false for the main version.