Kubernetes CKA sample exam question 125 with answer

Question
Print pods name and pods IP to /opt/pod-status file.

Answer

kubectl get pods -A -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.status.podIP}{"\n"}{end}' > /opt/pod-status