如果需要从集群中批量查询容器 ID,可以使用以下命令:

kubectl get pods -o json | jq '.items[].status.containerStatuses[].containerID'
  •