On Friday, May 19, 2017, <morphey...@gmail.com> wrote:

> Hello all,
>
>
> I am super new to kubernetes and I have a usecase where I would need to
> deploy a specific container(app) which does the following steps..
>
> a) does some operations(business logic)
> b) need to build an image from a Dockerfile and publish to
> registry(through API)
> c) deploy POD(s) with that image.(create a deployment)(through API)
>
> Basically, this app can be a master Pod of sorts and that creates a
> multi-container pod through API on the cluster.


You can use the API, but doesn't seem like a good idea to do that at first
glance.

What are you trying to do, exactly? Are the slave pod yaml modified
depending on business logic? Can't that be obtained some other way on
container startup or just via a configmap? Seems way simpler.

Also, have you looked at jobs? You can run enforce, in your pipeline, to
run some jobs before deployment. So, you can use jobs and then just deploy
as usual, if that works for you.

And, Las but not least, you may want to create a third party resource.
Check at that. But I'm not sure, from what you tell, that it is what you
really want.



> If it is possible for that master pod/container(app) to create pods
> through API, I would just need to build image, push to private registry and
> then create a deployment on k8s from that app.
>
> I did look into init containers, and the reason why I feel init containers
> cannot be used is because there will be good amount of business logic on
> the master POD(app).


Sorry, and why is that a problem? I don't follow

Also, to understand better, if you weren't using kubernetes and just VMS
with chef or puppet. What will you do?

-- 
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.

Reply via email to