I executing a command that give me cpu limit
kubectl get pods -o=jsonpath='{.items[*]..resources.limits.cpu}' -A
How can I modify the command to show pod name and the memory limit also
CodePudding user response:
You can format the jsonpath like this.
kubectl get pods -Ao jsonpath='{range .items[*]}{"name: "}{@.metadata.name}{" cpu: "}{@..resources.limits.cpu}{" memory: "}{@..resources.limits.memory}{"\n"}{"\n"}{end}'