0
0
Kubernetesdevops~10 mins

Node troubleshooting 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 nodes in the Kubernetes cluster.

Kubernetes
kubectl get [1]
Drag options to blanks, or click blank then click option'
Aservices
Bnodes
Cpods
Ddeployments
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'pods' instead of 'nodes' will list pods, not nodes.
Using 'services' or 'deployments' will show other resources, not nodes.
2fill in blank
medium

Complete the command to describe a node named 'worker-1' to see detailed info.

Kubernetes
kubectl [1] node worker-1
Drag options to blanks, or click blank then click option'
Adescribe
Bexec
Clogs
Dget
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'get' shows summary info, not detailed.
Using 'logs' or 'exec' are for pods, not nodes.
3fill in blank
hard

Fix the error in the command to check node status by filling the missing flag.

Kubernetes
kubectl get nodes -o [1]
Drag options to blanks, or click blank then click option'
Awide
Byaml
Cjson
Djsonpath
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'json' or 'yaml' outputs data in formats harder to read quickly.
Using 'jsonpath' requires a query expression.
4fill in blank
hard

Fill both blanks to create a command that shows node labels and filters nodes with label 'env=prod'.

Kubernetes
kubectl get nodes -L [1] --selector=[2]
Drag options to blanks, or click blank then click option'
Aenv
Benv=prod
Czone=us-east
Drole=worker
Attempts:
3 left
💡 Hint
Common Mistakes
Using a label name in the selector that doesn't match the label column.
Mixing label keys and values incorrectly.
5fill in blank
hard

Fill all three blanks to create a command that cordons a node, drains it, and then deletes it.

Kubernetes
kubectl [1] node worker-2 && kubectl [2] node worker-2 --ignore-daemonsets --delete-local-data && kubectl [3] node worker-2
Drag options to blanks, or click blank then click option'
Acordon
Bdrain
Cdelete
Duncordon
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'uncordon' instead of 'cordon' will allow scheduling, opposite of what is needed.
Skipping the drain step can cause pod disruption.
Deleting before draining can cause errors.