File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
content/zh-cn/docs/tasks/access-application-cluster Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -135,12 +135,12 @@ kubectl get pods --namespace kube-system -o jsonpath="{.items[*].spec.containers
135
135
<!--
136
136
## List Container images using a go-template instead of jsonpath
137
137
138
- As an alternative to jsonpath, Kubectl supports using [go-templates](https://golang.org/pkg/ text/template/ )
138
+ As an alternative to jsonpath, Kubectl supports using [go-templates](https://pkg.go.dev/ text/template)
139
139
for formatting the output:
140
140
-->
141
141
## 使用 go-template 代替 jsonpath 来获取容器镜像
142
142
143
- 作为 jsonpath 的替代,Kubectl 支持使用 [ go-templates] ( https://golang.org/pkg/ text/template/ ) 来格式化输出:
143
+ 作为 jsonpath 的替代,Kubectl 支持使用 [ go-templates] ( https://pkg.go.dev/ text/template ) 来格式化输出:
144
144
145
145
``` shell
146
146
kubectl get pods --all-namespaces -o go-template --template=" {{range .items}}{{range .spec.containers}}{{.image}} {{end}}{{end}}"
@@ -152,10 +152,10 @@ kubectl get pods --all-namespaces -o go-template --template="{{range .items}}{{r
152
152
### Reference
153
153
154
154
* [Jsonpath](/docs/reference/kubectl/jsonpath/) reference guide
155
- * [Go template](https://golang.org/pkg/ text/template/ ) reference guide
155
+ * [Go template](https://pkg.go.dev/ text/template) reference guide
156
156
-->
157
157
### 参考
158
158
159
159
* [ Jsonpath] ( /zh-cn/docs/reference/kubectl/jsonpath/ ) 参考指南
160
- * [ Go template] ( https://golang.org/pkg/ text/template/ ) 参考指南
160
+ * [ Go template] ( https://pkg.go.dev/ text/template ) 参考指南
161
161
You can’t perform that action at this time.
0 commit comments