Google Cloud Certified Associate Cloud Engineer Practice

Disable ads (and more) with a membership for a one time $2.99 payment

Prepare for the Google Cloud Certified Associate Cloud Engineer Exam. Engage with interactive quizzes and detailed explanations tailored to help you master key concepts. Ensure you're ready for a successful career in the cloud computing industry!

Practice this question and more.


Which flag is used with `kubectl` to specify the JSON path of properties in the JSON output?

  1. -j

  2. -p

  3. -json

  4. -o jsonpath

The correct answer is: -o jsonpath

The -j flag stands for "output as json" and is used to get the output as JSON. The -p flag provides the property pattern is used to do partial match with the property name in the output. The -json flag is not a valid flag for `kubectl` and will result in an error. The correct flag to specify the JSON path of properties is -o jsonpath.