Skip to content

Commit 8f12cd9

Browse files
committed
[zh] Update cheatsheet.md
Signed-off-by: Gao Qian <[email protected]>
1 parent 41f3993 commit 8f12cd9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

content/zh-cn/docs/reference/kubectl/cheatsheet.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -888,8 +888,9 @@ kubectl get pods -A -o=custom-columns='DATA:spec.containers[*].image'
888888
# All images running in namespace: default, grouped by Pod
889889
kubectl get pods --namespace default --output=custom-columns="NAME:.metadata.name,IMAGE:.spec.containers[*].image"
890890
891-
# All images excluding "k8s.gcr.io/coredns:1.6.2"
892-
kubectl get pods -A -o=custom-columns='DATA:spec.containers[?(@.image!="k8s.gcr.io/coredns:1.6.2")].image'
891+
# All images excluding "registry.k8s.io/coredns:1.6.2"
892+
kubectl get pods -A -o=custom-columns='DATA:spec.containers[?(@.image!="registry.k8s.io/coredns:1.6.2")].image'
893+
893894
894895
# All fields under metadata regardless of name
895896
kubectl get pods -A -o=custom-columns='DATA:metadata.*'
@@ -906,8 +907,8 @@ kubectl get pods -A -o=custom-columns='DATA:spec.containers[*].image'
906907
# 列举 default 名字空间中运行的所有镜像,按 Pod 分组
907908
kubectl get pods --namespace default --output=custom-columns="NAME:.metadata.name,IMAGE:.spec.containers[*].image"
908909

909-
# 除 "k8s.gcr.io/coredns:1.6.2" 之外的所有镜像
910-
kubectl get pods -A -o=custom-columns='DATA:spec.containers[?(@.image!="k8s.gcr.io/coredns:1.6.2")].image'
910+
# 除 "registry.k8s.io/coredns:1.6.2" 之外的所有镜像
911+
kubectl get pods -A -o=custom-columns='DATA:spec.containers[?(@.image!="registry.k8s.io/coredns:1.6.2")].image'
911912

912913
# 输出 metadata 下面的所有字段,无论 Pod 名字为何
913914
kubectl get pods -A -o=custom-columns='DATA:metadata.*'

0 commit comments

Comments
 (0)