Kubernetes - container count

PHOTO EMBED

Fri May 27 2022 13:38:20 GMT+0000 (UTC)

Saved by @Rohith #bash

kubectl get pods <-n namespace> <--all-namespace> -o jsonpath="{.items[*].spec.containers[*].name}" |tr -s '[[:space:]]' '\n' |sort |wc -l

kubectl get pods <-n namespace> <--all-namespace> -o jsonpath="{.items[*].spec.initContainers[*].name}" |tr -s '[[:space:]]' '\n' |sort |wc -l
content_copyCOPY