Last active
May 2, 2022 16:08
-
-
Save ahmadidev/9866f5b5993fde523c99ad6c869f38ea to your computer and use it in GitHub Desktop.
Get all containers in all namespaces with resources using jsonpath
This file contains 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
kubectl get pod -o jsonpath="{range .items[*]}{'Namespace: '}{.metadata.namespace}{range .spec.containers[*]}{' Container: | |
'}{.name}{' Resources: '}{.resources}{'\n'}{end}{end}" -A |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sample output: