From 16602983467caba541eb7fdfe4602923a855f91f Mon Sep 17 00:00:00 2001 From: Mohit Sharma Date: Mon, 6 Dec 2021 11:18:32 +1000 Subject: [PATCH] fixed the list container images by pod section (#30207) Signed-off-by: Mohit Sharma --- .../list-all-running-container-images.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/docs/tasks/access-application-cluster/list-all-running-container-images.md b/content/en/docs/tasks/access-application-cluster/list-all-running-container-images.md index 133eae902b..30c4841c6d 100644 --- a/content/en/docs/tasks/access-application-cluster/list-all-running-container-images.md +++ b/content/en/docs/tasks/access-application-cluster/list-all-running-container-images.md @@ -70,7 +70,7 @@ The formatting can be controlled further by using the `range` operation to iterate over elements individually. ```shell -kubectl get pods --all-namespaces -o=jsonpath='{range .items[*]}{"\n"}{.metadata.name}{":\t"}{range .spec.containers[*]}{.image}{", "}{end}{end}' |\ +kubectl get pods --all-namespaces -o jsonpath='{range .items[*]}{"\n"}{.metadata.name}{":\t"}{range .spec.containers[*]}{.image}{", "}{end}{end}' |\ sort ``` @@ -80,7 +80,7 @@ To target only Pods matching a specific label, use the -l flag. The following matches only Pods with labels matching `app=nginx`. ```shell -kubectl get pods --all-namespaces -o=jsonpath="{.items[*].spec.containers[*].image}" -l app=nginx +kubectl get pods --all-namespaces -o jsonpath="{.items[*].spec.containers[*].image}" -l app=nginx ``` ## List Container images filtering by Pod namespace