key command to this task kubectl get pods -n wonderland -o wide --sort-by=.status.podIP > /to_check/wonderland-pods.txt
Task:
Should we know where our pod is running on (node name) or its IP
address, the most easiest way is to get “extended” details with wide output format.
Please get all pods (from wonderland ns) details in wide format and save it into /to_check/wonderland-pods.txt on client host
Useful Command:
Getting Pods:
kubectl get \
${RESOURCE_TYPE} \
${RESOURCE_NAME} \
--namespace ${NS_NAME} \
-o wide
Sorting by IP Address:
kubectl get pods -o wide --sort-by=.status.podIP
Documentation:
- https://kubernetes.io/docs/reference/kubectl/cheatsheet/#viewing-finding-resources
- https://kubernetes.io/docs/concepts/workloads/pods/pod/
Complete the task and answer the questions below:
Check Report
Report file (/to_check/wonderland-pods.txt):
✓ is found
✓ file contains correct data
Score: 100
What about Quiz?
Немає коментарів:
Дописати коментар