Skip to content

Instantly share code, notes, and snippets.

@vepetkov
Created September 12, 2018 10:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vepetkov/cd1fbad31b5d53801dfc90ae26054535 to your computer and use it in GitHub Desktop.
Save vepetkov/cd1fbad31b5d53801dfc90ae26054535 to your computer and use it in GitHub Desktop.
kubectl: get requested resources for all pods
# 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