Created
September 12, 2018 10:38
-
-
Save vepetkov/cd1fbad31b5d53801dfc90ae26054535 to your computer and use it in GitHub Desktop.
kubectl: get requested resources for all pods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get the requested resources for all pods by container | |
kubectl get pods -ao jsonpath='{range .items[*]}{@.metadata.name}{"\n"}{range @.spec.containers[*]}{"\t"}{@.name}{" cpu:"}{@.resources.requests.cpu}{" mem:"}{@.resources.requests.memory}{"\n"}{end}{end}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment