@@ -3,8 +3,8 @@ title: kubectl 备忘单
3
3
content_type : concept
4
4
weight : 10
5
5
card :
6
- name : reference
7
- weight : 30
6
+ name : tasks
7
+ weight : 10
8
8
---
9
9
<!--
10
10
title: kubectl Cheat Sheet
@@ -15,8 +15,8 @@ reviewers:
15
15
content_type: concept
16
16
weight: 10 # highlight it
17
17
card:
18
- name: reference
19
- weight: 30
18
+ name: tasks
19
+ weight: 10
20
20
-->
21
21
22
22
<!-- overview -->
@@ -886,6 +886,8 @@ Output format | Description
886
886
--------------| -----------
887
887
`-o=custom-columns=<spec>` | Print a table using a comma separated list of custom columns
888
888
`-o=custom-columns-file=<filename>` | Print a table using the custom columns template in the `<filename>` file
889
+ `-o=go-template=<template>` | Print the fields defined in a [golang template](https://pkg.go.dev/text/template)
890
+ `-o=go-template-file=<filename>` | Print the fields defined by the [golang template](https://pkg.go.dev/text/template) in the `<filename>` file
889
891
`-o=json` | Output a JSON formatted API object
890
892
`-o=jsonpath=<template>` | Print the fields defined in a [jsonpath](/docs/reference/kubectl/jsonpath) expression
891
893
`-o=jsonpath-file=<filename>` | Print the fields defined by the [jsonpath](/docs/reference/kubectl/jsonpath) expression in the `<filename>` file
@@ -897,6 +899,8 @@ Output format | Description
897
899
--------------| -----------
898
900
` -o=custom-columns=<spec> ` | 使用逗号分隔的自定义列来打印表格
899
901
` -o=custom-columns-file=<filename> ` | 使用 ` <filename> ` 文件中的自定义列模板打印表格
902
+ ` -o=go-template=<template> ` | 打印在 [ golang 模板] ( https://pkg.go.dev/text/template ) 中定义的字段。
903
+ ` -o=go-template-file=<filename> ` | 打印在 ` <filename> ` 文件中由 [ golang 模板] ( https://pkg.go.dev/text/template ) 定义的字段。
900
904
` -o=json ` | 输出 JSON 格式的 API 对象
901
905
` -o=jsonpath=<template> ` | 打印 [ jsonpath] ( /zh-cn/docs/reference/kubectl/jsonpath ) 表达式中定义的字段
902
906
` -o=jsonpath-file=<filename> ` | 打印在 ` <filename> ` 文件中定义的 [ jsonpath] ( /zh-cn/docs/reference/kubectl/jsonpath ) 表达式所指定的字段。
0 commit comments