JSON PATH
JSON PATH
1
2
3
kubectl  get deploy  -o custom-columns=DEPLOYMENT:.metadata.name,CONTAINER_IMAGE:.spec.template.spec.containers[*].image,READY_REPLICAS:.status.readyReplicas,NAMESPACE:.metadata.namespace --sort-by=.metadata.name > /opt/admin2406_data
kubectl  get nodes -o jsonpath="{range .items[*]}{.status.addresses[?(@.type=='InternalIP')].address}{end}" >  /root/CKA/node_ips
 This post is licensed under  CC BY 4.0  by the author.
