DEV Community

Roy
Roy

Posted on

1 1

kubectl -ojsonpath

bettwen jsonpath and template, there should be a equal sign
right

kubectl get pod mysql-0 -n coding -ojsonpath="{.metadata.name}"
Enter fullscreen mode Exit fullscreen mode

or

kubectl get pod mysql-0 -n coding -o jsonpath="{.metadata.name}"
Enter fullscreen mode Exit fullscreen mode

wrong

kubectl get pod mysql-0 -n coding -ojsonpath "{.metadata}"
Enter fullscreen mode Exit fullscreen mode

will report

error: template format specified but no template given

Top comments (1)

Collapse
 
weksup profile image
Weksup

So ,Did you solve this problems?

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay