File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
content/zh-cn/docs/reference/kubectl Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -888,8 +888,9 @@ kubectl get pods -A -o=custom-columns='DATA:spec.containers[*].image'
888
888
# All images running in namespace: default, grouped by Pod
889
889
kubectl get pods --namespace default --output=custom-columns="NAME:.metadata.name,IMAGE:.spec.containers[*].image"
890
890
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
+
893
894
894
895
# All fields under metadata regardless of name
895
896
kubectl get pods -A -o=custom-columns='DATA:metadata.*'
@@ -906,8 +907,8 @@ kubectl get pods -A -o=custom-columns='DATA:spec.containers[*].image'
906
907
# 列举 default 名字空间中运行的所有镜像,按 Pod 分组
907
908
kubectl get pods --namespace default --output=custom-columns=" NAME:.metadata.name,IMAGE:.spec.containers[*].image"
908
909
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'
911
912
912
913
# 输出 metadata 下面的所有字段,无论 Pod 名字为何
913
914
kubectl get pods -A -o=custom-columns=' DATA:metadata.*'
You can’t perform that action at this time.
0 commit comments