kubectl 描述未知速记标志 -o

Mam*_*mun 4 google-cloud-platform kubernetes google-kubernetes-engine kubectl

我认为 -o 应该是 kubectl 的通用选项。但是,当我运行以下 kubectl 命令时,不知何故我收到以下错误。

你能告诉我为什么吗?谢谢你。

mamun$ kubectl describe secret -n development serviceaccount-foo -o yaml
Error: unknown shorthand flag: 'o' in -o
See 'kubectl describe --help' for usage.
Run Code Online (Sandbox Code Playgroud)

mas*_*eyb 5

-o | --output不是通用标志,它不包含在默认kubectl标志( 1.18) 中,kubectl describe也不支持--output(或简写-o)标志