0
0
Kubernetesdevops~10 mins

Creating custom namespaces in Kubernetes - Interactive Practice

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

Complete the command to create a new namespace named 'dev'.

Kubernetes
kubectl create namespace [1]
Drag options to blanks, or click blank then click option'
Adevelopment
Bprod
Cdev
Ddefault
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'default' which is a pre-existing namespace.
Misspelling the namespace name.
Omitting the namespace name.
2fill in blank
medium

Complete the command to list all namespaces in the cluster.

Kubernetes
kubectl get [1]
Drag options to blanks, or click blank then click option'
Anamespaces
Bpods
Cservices
Dnodes
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pods' or 'services' instead of 'namespaces'.
Using singular form like 'namespace' which is incorrect.
3fill in blank
hard

Fix the error in the command to delete the namespace named 'test'.

Kubernetes
kubectl delete [1] test
Drag options to blanks, or click blank then click option'
Anode
Bnamespace
Cservice
Dpod
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pod' or 'service' instead of 'namespace'.
Omitting the resource type.
4fill in blank
hard

Fill both blanks to create a namespace using a YAML file named 'ns.yaml'.

Kubernetes
kubectl [1] -f [2]
Drag options to blanks, or click blank then click option'
Aapply
Bcreate
Cdelete
Dns.yaml
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'apply' instead of 'create' for initial creation.
Using wrong file name or omitting the file.
5fill in blank
hard

Fill all three blanks to define a namespace named 'staging' in a YAML manifest.

Kubernetes
apiVersion: v1
kind: [1]
metadata:
  name: [2]
  labels:
    environment: [3]
Drag options to blanks, or click blank then click option'
ANamespace
Bstaging
Cstaging-env
DPod
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Pod' instead of 'Namespace' for kind.
Incorrect or missing name and label values.