一个简单的monolith应用程序是否需要kubernetes来管理

Does a simple monolith application need kubernetes to manage

我对基础架构还很陌生,所以我构建了一个简单的单体应用程序,并使用 docker 构建容器并将其部署在我的 linux 服务器上。我的问题是,我是否需要为单个容器安装 kubernetes,如果不需要,我该如何扩展或进行负载平衡。

"...我是否需要为单个容器安装 kubernetes" - 不,这不是强制性的。可以使用 docker 来管理应用程序。 Kubernetes 是一个 可以 用于编排容器化应用程序的平台。它提供了像 autoscaling based on load, isolation through namespaces, network access management through services and ingresses, and much more. But Kubernetes is not the only platform for orchestration. There are others, for example OpenShift, docker swarm, rancher 这样的工具和概念。所有这些都是可选平台,带有额外的工具和概念,可以在必要时使用。

"我如何扩展或进行负载平衡。" - 例如,我们可以定义副本 through the replicas variable in a docker-compose file. All containers defined under a service are accessed through this service's name. How exactly the balancing is done can also be configured through the endpoint_mode configuration. If we need even more control, we can deploy a separate load balancer, e.g. nginx. A possible configuration is described in this medium article


对于以后的帖子,please limit yourself to one question per post