aws-workshop-for-kubernetes
aws-workshop-for-kubernetes copied to clipboard
Command to show Default memory and CPU is not working
- zsh 5.3.1
- kubectl version : v1.9.1
A command here doesn't return the result as expected. Instead of it, a command below works. (containers[] -> containers..)
kubectl get pod/nginx-pod -o jsonpath={.spec.containers..resources}
The module has been moved to https://github.com/aws-samples/aws-workshop-for-kubernetes/blob/master/01-path-basics/103-kubernetes-concepts/readme.adoc#default-memory-and-cpu
The command kubectl get pod/nginx-pod2 -o jsonpath={.spec.containers[].resources}
works as expected providing this result:
map[limits:map[memory:200Mi cpu:2] requests:map[cpu:1 memory:100Mi]]
Can you re-run the command and update this issue with your console output?
I think the issue is with zsh. I am facing the same issue. My colleagues are able to run it as-is. The command does not work for me until I surround the filter expression with single quotes like this.
kubectl get pod/nginx-pod -o jsonpath='{.spec.containers.resources}'
And you also have two periods after containers in your expression. Is that just a typo in this issue?