【发布时间】:2019-09-19 14:15:47
【问题描述】:
我是 k8 设置的新手,我想知道在生产中部署服务的最佳方式是什么。以下是我能想到的几种方法,你能指导我正确的方向吗?
1) Deploy each *.war file into a apache tomcat docker container, and using the service discovery mechanism of k8's.
2) Run each application normally using "java -jar *.war" into pods and expose their ports using port binding.
谢谢。
【问题讨论】:
-
我建议使用基于 docker 的方法。我从未尝试将应用程序直接运行到 pod 中。
-
@YogeshPrajapati 我正在尝试基于 docker 的方法,但我很困惑是将我的服务部署到 Apache tomcat docker 容器还是像“java -jar *.war”一样正常运行我的 docker 容器直接暴露在生产环境中的端口?
标签: spring-boot tomcat kubernetes microservices