Reputation: 11422
I am able to get a list of all pods running on a kubernetes cluster using:
kubectl get pods
How do I get all the containers running on a particular pod?
Upvotes: 5
Views: 9579
Reputation: 11
kubectl describe pod podname
, if you would like get the image name of the container in the pod then kubectl get pods -o=jsonpath="{.items[*].spec.containers[*].image}" -l key=value
.
Upvotes: 1
Reputation: 1499760
You can use the describe
command:
kubectl describe pod [podname]
That will specify which containers are in the pod, along with other information.
Upvotes: 14