How to list all containers of given pod in kubernetes

--

it is simple :)

k get pod <pod name> -n <namespace> -o  jsonpath="{.spec.containers[*].image}" |tr -s '[[:space:]]' '\n' |sort |uniq -c

--

--