Difference between revisions of "Jsonpath"
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
Tjp67Ib3c2PxvGoD6SH1pjTtnlq6X4XvrXo4xxx | Tjp67Ib3c2PxvGoD6SH1pjTtnlq6X4XvrXo4xxx | ||
− | kubectl get pods -o jsonpath='{range .items[*]}{"pod: "}{.metadata.name}{"\n"}{range .spec.containers[*]}{"\tname: "}{.name}{"\n\timage: "}{.image}{"\n"}{end}' | + | [[kubectl get pods]] -o jsonpath='{range .items[*]}{"pod: "}{.metadata.name}{"\n"}{range .spec.containers[*]}{"\tname: "}{.name}{"\n\timage: "}{.image}{"\n"}{end}' |
Revision as of 12:49, 7 July 2022
kubectl get secret --namespace default grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo Tjp67Ib3c2PxvGoD6SH1pjTtnlq6X4XvrXo4xxx
kubectl get pods -o jsonpath='{range .items[*]}{"pod: "}{.metadata.name}{"\n"}{range .spec.containers[*]}{"\tname: "}{.name}{"\n\timage: "}{.image}{"\n"}{end}'
See also
Advertising: