Multiple containers in one pod

后端 未结 1 1507
南旧
南旧 2021-01-22 13:16

I am migrating an application from openshift 2 such consists of a Java(jetty) webserver and a mongo database. Both the webserver and mongo need access to persistent storage, as

1条回答
  •  生来不讨喜
    2021-01-22 13:49

    It is possible to do it if you really needed to, but not normally recommended for production systems.

    In doing it, you are limited to a single replica and cannot scale your application, also, you can't use Rolling deployment strategy and must use Recreate.

    For some examples of templates which deploy a database with front end together in same pod which you might adapt, see the 'testing' variants of the templates at:

    • https://github.com/openshift-evangelists/wordpress-quickstart/tree/master/templates

    For those templates the build of the application image was done as separate manual step and they were just handling the deployment, so you will need to incorporate the build configuration into them yourself after you have copied and modified them for your own purposes.


    UPDATE 1

    Those templates do now include build configurations as have been tweaking the way they work.

    0 讨论(0)
提交回复
热议问题