The initContainer is tightly bound to the pod, and a pod only ever exists on one node.
You could use separate pods – one (created via a Job) that initializes the volume, then one (via a Deployment) that uses it. You should be able to get VolumeClaims and friends to help you in passing it along. /MR On Thu, Nov 23, 2017 at 2:27 PM <sami.hiltu...@lovoo.com> wrote: > Hey, > > We have use case where we would like to load some data on a GCE persistent > disk before running the main container. We'd like to run this as a separate > step since the resource requirements differ significantly between the > 'recovery' and normal operation. InitContainers allow us to ask for more > resources during the recovery than the normal operation. However, this > would require us to have bigger nodes running so the recovery will have > sufficient resources. The difference in resource usage is on the scale of > 16 CPUs during recovery to 2 CPUs during normal operation. Ideally, we'd > like to have an autoscaling High CPU node pool, that will scale down to > zero if there are no components in the recovery phase. Is this somehow > possible to implement? We are running into a wall as taints and affinities > are per Pod rather than per container and it seems that the initContainers > are always running where the normal containers will be. > > Can we somehow run the recovery phase on a high CPU node pool and run the > main containers on the normal node pools? > > Regards, > Sami Hiltunen > > -- > 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+unsubscr...@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. > -- 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+unsubscr...@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.