How to format the output of kubectl describe to JSON

后端 未结 4 1429
甜味超标
甜味超标 2020-12-17 08:25

kubectl get command has this flag -o to format the output.

Is there a similar way to format the output of the kubectl describe

4条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-17 08:53

    As @janekuto suggested

    describe cannot be used to display data in json format

    Please see my answer here. jq is really a powerful utility to play around with json display of kubectl. You can do so much with jq without putting too much efforts.

    kubectl - format the resource quota values in json format

提交回复
热议问题