aws-workshop-for-kubernetes icon indicating copy to clipboard operation
aws-workshop-for-kubernetes copied to clipboard

Command to show Default memory and CPU is not working

Open ygtx opened this issue 6 years ago • 2 comments

  • 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}

ygtx avatar Jan 10 '18 06:01 ygtx

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?

buzzsurfr avatar Jun 14 '18 11:06 buzzsurfr

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?

sumitmundhada avatar Jun 28 '20 09:06 sumitmundhada