SIMULATION
Monitor the logs of pod foo and:
• Extract log lines corresponding to error
unable - to - access - website
• Write them to
/opt/KULM00201/foo
Solution
solution
Question No 2
SIMULATION
List all persistent volumes sorted by capacity, saving the full kubectl output to
/opt/KUCC00102/volume_list. Use kubectl 's own functionality for sorting the output, and do not
manipulate it any further.
Solution
solution
Question No 3
SIMULATION
Ensure a single instance of pod nginx is running on each node of the Kubernetes cluster where nginx
also represents the Image name which has to be used. Do not override any taints currently in place.
Use DaemonSet to complete this task and use ds - kusc00201 as DaemonSet name.
Solution
solution
Question No 4
List all the pods sorted by created timestamp
Solution
kubect1 get pods - - sort - by=.metadata.creationTimestamp
Question No 5
List all the pods showing name and namespace with a json path expression
Solution
kubectl get pods - o=jsonpath="{.items[*]['metadata.name',
'metadata.namespace']}"