可以通过以下命令获取 pod 的image:
kubectl describe pod <pod-name> | grep -i image
其中,<pod-name>
是需要查询的 pod 的名称。该命令会输出该 pod 中使用的所有 container 的 image 信息。
另外,也可以通过以下命令列出所有 pod 中使用的所有 image:
kubectl get pods -o jsonpath="{..image}" | tr -s '[[:space:]]' '\n' | sort | uniq -c
该命令会输出每个 image 在所有 pod 中使用的次数。