【问题标题】:kubectl describe unknown shorthand flag -okubectl 描述未知的速记标志 -o
【发布时间】:2021-01-19 05:09:24
【问题描述】:

我认为 -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.

【问题讨论】:

  • kubectl get 支持-o | --output 标志,您可以将get Secrets 规范为yaml: kubectl get secret -n development serviceaccount-foo -o yaml

标签: kubernetes google-cloud-platform google-kubernetes-engine kubectl


【解决方案1】:

-o | --output 不是通用标志,它不包含在默认的kubectl flags (1.18) 和kubectl describe does not support the --output (or shorthand -o) flag 中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-25
    • 1970-01-01
    • 2022-08-09
    • 2023-02-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多