Can I add side car container to a running pod?

782 views
Skip to first unread message
Assigned to josp...@redhat.com by me

Tamal Saha

unread,
Mar 1, 2017, 5:53:03 PM3/1/17
to Kubernetes user discussion and Q&A
Hi,
I am working on a TPR controller that will add a side card container to a pod. From what I can tell so far is that a side car container can't be added to an existing pod. I get an error message like below:
  1. pods "two-containers" was not valid:
  2. # * spec.containers: Forbidden: pod updates may not add or remove containers
  3. #
So, my TPR controller basically have to add the side card container to the RC or Deployment PodTemplate and then restart the pods. Is there a way to do with without requiring restarting running pods? This seems possible from pure Linux namespace perspective.

Thanks,
-Tamal 

Rodrigo Campos

unread,
Mar 1, 2017, 6:27:28 PM3/1/17
to kubernet...@googlegroups.com
Afaik, is not possible.

And the idea is that deploys are easy, so you do them a lot, and not mutate your things but just deploy (to add a sidecar container or whatever).

But maybe there is a way that I don't know about
--
You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscribe@googlegroups.com.
To post to this group, send email to kubernetes-users@googlegroups.com.
Visit this group at https://groups.google.com/group/kubernetes-users.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages