简体   繁体   English

Kubernetes容器集群约定

[英]Kubernetes container cluster conventions

I have been trying out kubernetes on GCP to build microservices for a while and it has been amazing so far. 我一直在GCP上尝试使用kubernetes来构建微服务,到目前为止,它一直很棒。

Although i am a bit confused on what would probably be the best approach, should i 尽管我对最好的方法有些困惑,但我应该

  1. create ( gcloud container clusters create "[cluster-name]" ... ) one container-cluster per service? 创建( gcloud container clusters create "[cluster-name]" ... )每个服务一个容器集群?
  2. create one container-cluster for multiple services? 创建一个容器集群以提供多种服务? or 要么
  3. do both of those above depending on my situation? 以上两种情况都取决于我的情况吗?

all of the examples i have managed to find has only covered #2, but my hunch is kind of telling me that i should do #1, and my hunch is also kind of telling me that i have probably missed some basic understanding around containers, i have been trying to find answers without any luck, i guess i just can't figure out the right search keyword, i am hoping that i could find some answer here. 我设法找到的所有示例仅涵盖了#2,但是我的直觉告诉我我应该做#1,我的直觉也告诉我我可能错过了一些关于容器的基本知识,我一直在寻找没有运气的答案,我想我只是找不到正确的搜索关键字,我希望我可以在这里找到一些答案。

I suspect the answer is "it depends" (Option 3) 我怀疑答案是“取决于”(选项3)

How isolated do you need each application to be? 您需要每个应用程序有多隔离? How much redundancy (tolerance of VM failure) do you need? 您需要多少冗余(VM故障容忍度)? How many developers will have access to the Kubernetes cluster? 有多少开发人员可以访问Kubernetes集群? How much traffic do the apps generate? 这些应用产生多少流量?

If in doubt I recommend running all your apps on a single cluster. 如有疑问,建议您在单个群集上运行所有应用程序。 Simpler to manage and the overhead in providing highly available infrastructure is then shared. 更易于管理,然后共享提供高可用性基础结构的开销。 You'll also have greater levels of VM utilization, which perhaps might result in reduced hosting costs. 您还将具有更高级别的VM利用率,这可能会降低托管成本。 The latter is a subjective observation, some apps have very little or occasional traffic resulting in very bored servers :-) 后者是一个主观观察,某些应用的流量很小或偶尔会导致服务器非常无聊:-)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM