A Kubernetes worker node, namedwk8s-node-0is in stateNotReady.Investigate why this is
the case, andperform any appropriate steps tobring the node to aReadystate,ensuring that
any changes are madepermanent.
You cansshto the failednode using:
[student@node-1] $ | sshWk8s-node-0
You can assume elevatedprivileges on the node with thefollowing command:
[student@w8ks-node-0] $ |sudo –i
Check the Image version of nginx-dev pod using jsonpath
Answer: See the solution below.
Explanation:
kubect1 get po nginx-dev -o
jsonpath='{.spec.containers[].image}{"\n"}'
Print pod name and start time to “/opt/pod-status” file
Answer: See the solution below.
Explanation:
kubect1 get pods -o=jsonpath='{range items[*]}{.metadata.name}{"\t"}{.status.podIP}{"\n"}{end}'
Create a busybox pod that runs the command “env” and save the output to “envpod” file
List all the pods sorted by name
Answer: See the solution below.
Explanation:
kubect1 get pods -sort-by=.metadata.name
Page 2 out of 13 Pages |
Previous |