0
0
Kubernetesdevops~10 mins

Default namespaces overview in Kubernetes - Interactive Code Practice

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

Complete the command to list all namespaces in Kubernetes.

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' instead of 'namespaces' will list pods, not namespaces.
Using 'services' or 'nodes' will list other resources, not namespaces.
2fill in blank
medium

Complete the command to switch to the default namespace in Kubernetes.

Kubernetes
kubectl config set-context --current --namespace=[1]
Drag options to blanks, or click blank then click option'
Adefault
Bkube-system
Cproduction
Ddev
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'kube-system' switches to the system namespace, not default.
Using custom names like 'production' or 'dev' will fail if those namespaces don't exist.
3fill in blank
hard

Fix the error in the command to describe the default namespace.

Kubernetes
kubectl describe [1] default
Drag options to blanks, or click blank then click option'
Apod
Bnode
Cservice
Dnamespace
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pod' will try to describe a pod named 'default', which likely does not exist.
Using 'service' or 'node' will describe other resource types, not namespaces.
4fill in blank
hard

Fill both blanks to create a pod in the default namespace using kubectl.

Kubernetes
kubectl run nginx --image=nginx --restart=Never -n [1] --port=[2]
Drag options to blanks, or click blank then click option'
Adefault
B80
C443
Dkube-system
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'kube-system' will create the pod in the system namespace, not default.
Using port 443 is for HTTPS, but nginx defaults to 80.
5fill in blank
hard

Fill all three blanks to list pods in the default namespace with wide output.

Kubernetes
kubectl get [1] -n [2] -o [3]
Drag options to blanks, or click blank then click option'
Apods
Bdefault
Cwide
Dservices
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'services' instead of 'pods' will list services, not pods.
Using other output formats like 'json' or 'yaml' will show different formats, not wide.