SIMULATION
Check the image version in pod without the describe command
kubectl get po nginx -o
jsonpath='{.spec.containers[].image}{'\n'}'
SIMULATION
Get list of all pods in all namespaces and write it to file ''/opt/pods-list.yaml''
kubectl get po --all-namespaces > /opt/pods-list.yaml
SIMULATION
Print pod name and start time to ''/opt/pod-status'' file
kubect1 get pods -o=jsonpath='{range
items[*]}{.metadata.name}{'\t'}{.status.podIP}{'\n'}{end}'
Which command displays the current working directory?
You need to display the last 20 lines of a log file.
Which command should you use?