0
0
Kubernetesdevops~10 mins

kubectl get for listing resources 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 pods in the current Kubernetes namespace.

Kubernetes
kubectl get [1]
Drag options to blanks, or click blank then click option'
Anodes
Bdeployments
Cpods
Dservices
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'services' instead of 'pods' will list services, not pods.
Using 'nodes' lists cluster nodes, not pods.
2fill in blank
medium

Complete the command to list all services in the 'default' namespace.

Kubernetes
kubectl get [1] -n default
Drag options to blanks, or click blank then click option'
Aservices
Bpods
Cdeployments
Dconfigmaps
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pods' will list pods, not services.
Forgetting the namespace flag will list resources in the current namespace.
3fill in blank
hard

Fix the error in the command to list all deployments in all namespaces.

Kubernetes
kubectl get [1] --all-namespaces
Drag options to blanks, or click blank then click option'
Adeployments
Bservices
Cpods
Dnodes
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pods' will list pods, not deployments.
Using 'nodes' lists cluster nodes, not deployments.
4fill in blank
hard

Fill both blanks to list all pods with detailed information in the 'kube-system' namespace.

Kubernetes
kubectl get [1] -n [2] -o wide
Drag options to blanks, or click blank then click option'
Apods
Bservices
Ckube-system
Ddefault
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'services' instead of 'pods' will list services.
Using 'default' namespace will not show 'kube-system' pods.
5fill in blank
hard

Fill all three blanks to list all nodes with labels in the cluster.

Kubernetes
kubectl get [1] -o [2] --show-labels=[3]
Drag options to blanks, or click blank then click option'
Anodes
Bwide
Ctrue
Dpods
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pods' instead of 'nodes' will list pods, not nodes.
Omitting '--show-labels=true' hides labels.