Help running Symfony3 + MongoDB on GKE

31 views
Skip to first unread message

rinzl...@gmail.com

unread,
Nov 21, 2017, 5:51:09 AM11/21/17
to Kubernetes user discussion and Q&A
Hello,

We are trying to run our app made with Symfony3 and MongoDB on Container Engine but we do not see where to begin.

A litte help would be really appreciated.

Note: our app is already containerized with Apache, PHP7 and MongoDB bundled in the image but I think we have to separate MongoDB to run it separately.

Cheers.

David Michael Gang

unread,
Nov 21, 2017, 6:59:10 AM11/21/17
to Kubernetes user discussion and Q&A
This is a very general question. Regarding the mongodb, it would be important to have it in a different container/pod or even have a cloud provider which gives it.
There is a guide which explains this: http://blog.kubernetes.io/2017/01/running-mongodb-on-kubernetes-with-statefulsets.html
Regarding the symfony app i would recommend to start with https://kubernetes.io/docs/tasks/run-application/run-stateless-application-deployment/ and then create a service of type load balancer: https://kubernetes.io/docs/concepts/services-networking/service/

rinzl...@gmail.com

unread,
Nov 21, 2017, 10:18:51 AM11/21/17
to Kubernetes user discussion and Q&A
Thanks for your reply and the resources. In fact we need something like this:
- A persistant storage for MongoDB
- A persistante storage for User uploaded items (maybe it can be the same volume than the one for Mongo)
- Our MongoDB service
- Our Web service (running Apache, PHP and our app) linked with the MongoDB service.

Is it the right way of thinking the project?

Cheers.

David Michael Gang

unread,
Nov 21, 2017, 10:30:14 AM11/21/17
to kubernet...@googlegroups.com
Yes.
You need to make the mongo stateful and give it a mounted volume.
The persistent storage is achieved by volumes: https://kubernetes.io/docs/concepts/storage/volumes/

If you don't want to upload the items to mongo i would do it in a different volume.


--
You received this message because you are subscribed to a topic in the Google Groups "Kubernetes user discussion and Q&A" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kubernetes-users/yI-kHy_tze8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kubernetes-use...@googlegroups.com.
To post to this group, send email to kubernet...@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