0

I have set a N replica pods running workers celery. Now I need to setup a cron JOB running a celery producer script then I need to be able to get a container id for container using a tagged image.

So how to list all container id for multi-containers (container A and container B) pod where container A is using a tagged image C.

Ali SAID OMAR
  • 6,404
  • 8
  • 39
  • 56

1 Answers1

-2

One way is to do "kubectl get pods" to get all pod names, then do "kubectl get pod " for each pod. See this documentation page for information about the templating arguments you can use with "kubectl get pod" to just select the fields you want (for example, image).

DavidO
  • 1,647
  • 11
  • 7
  • 1
    Now i'm using something like this http://stackoverflow.com/questions/35797906/kubernetes-list-all-running-pods-name/35803557#35803557 and my container have always the same name. :) – Ali SAID OMAR Mar 08 '16 at 10:21