Write a command into “/opt/course/5/find_pods.sh” which lists all Pods sorted by their AGE (metadata.creationTimestamp). How to write into the command into the path??..And how to write reason in “TEXT” format into a path???
If you are asking about how to export the result in json file please use this method
kubectl get pods -o=jsonpath="{range .items[*]}{.metadata.creationTimestamp}{'\n'}{end}"
Thanks
KodeKloud Support