0
0
Kubernetesdevops~10 mins

Why namespaces provide isolation in Kubernetes - Test Your Understanding

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

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

Kubernetes
kubectl create namespace [1]
Drag options to blanks, or click blank then click option'
Atest
Bproduction
Cdefault
Ddev
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'default' instead of 'dev' creates the default namespace, not a new one.
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' lists pods, not namespaces.
3fill in blank
hard

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

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' deletes a pod, not the namespace.
4fill in blank
hard

Fill both blanks to run a pod named 'web' in the 'prod' namespace.

Kubernetes
kubectl run web --image=nginx --namespace=[1] --restart=[2]
Drag options to blanks, or click blank then click option'
Aprod
BNever
CAlways
Ddev
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'dev' namespace instead of 'prod'.
Using 'Always' restart policy creates a Deployment, not a pod.
5fill in blank
hard

Fill all three blanks to create a resource quota named 'quota1' in namespace 'test' limiting pods to 5.

Kubernetes
kubectl create quota [1] --namespace=[2] --hard=[3]
Drag options to blanks, or click blank then click option'
Aquota1
Btest
Cpods=5
Dpods=10
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pods=10' sets a higher limit than asked.
Wrong namespace name causes quota to apply elsewhere.