烂翻译系列之Kubernetes实战——在本地和云上运行kubernetes
If you want to run your applications on Kubernetes, you have to decide whether you want to run them locally, in your organization’s own infrastructure (on-premises) or with one of the major cloud providers, or perhaps both - in a hybrid cloud solution.
如果想要在Kubernetes上运行应用,那么必须决定是在本机、在组织自己的基础设施(本地)中运行它们,还是在一个主要云提供商中运行它们,或者两者——在一个混合云解决方案中
Running Kubernetes on-premises 本地运行Kubernetes
Running Kubernetes on your own infrastructure may be your only option if regulations require you to run applications on site. This usually means that you’ll have to manage Kubernetes yourself, but we’ll come to that later.
如果规章制度要求你在现场运行应用,那么在自己的基础设施上运行Kubernetes可能是唯一选择。这通常意味着你将不得不自己管理Kubernetes,但我们将在稍后讨论这个问题。
Kubernetes can run directly on your bare-metal machines or in virtual machines running in your data center. In either case, you won’t be able to scale your cluster as easily as when you run it in virtual machines provided by a cloud provider.
Kubernetes可以直接在裸机上运行,也可以在数据中心运行的虚拟机中运行。在这两种情况下,你都不能像在云提供商提供的虚拟机中运行集群那样伸缩集群。
Deploying Kubernetes in the cloud 在云中部署Kubernetes
If you have no on-premises infrastructure, you have no choice but to run Kubernetes in the cloud. This has the advantage that you can scale your cluster at any time at short notice if required. As mentioned earlier, Kubernetes itself can ask the cloud provider to provision additional virtual machines when the current size of the cluster is no longer sufficient to run all the applications you want to deploy.
如果没有本地基础设施,那么别无选择,只能在云中运行Kubernetes。这样做的好处是,如果需要,可以随时在短时间内扩展集群。如前所述,当集群的当前大小不再足以运行你想部署的所有应用时,Kubernetes本身可以要求云提供商提供额外的虚拟机。
When the number of workloads decreases and some worker nodes are left without running workloads, Kubernetes can ask the cloud provider to destroy the virtual machines of these nodes to reduce your operational costs. This elasticity of the cluster is certainly one of the main benefits of running Kubernetes in the cloud.
当工作负载减少,一些工作节点没有运行工作负载时,Kubernetes可以要求云提供商销毁这些节点的虚拟机,以降低运营成本。集群的这种弹性当然是在云中运行Kubernetes的主要好处之一。
Using a hybrid cloud solution 使用混合云方案
A more complex option is to run Kubernetes on-premises, but also allow it to spill over into the cloud. It’s possible to configure Kubernetes to provision additional nodes in the cloud if you exceed the capacity of your own data center. This way, you get the best of both worlds. Most of the time, your applications run locally without the cost of virtual machine rental, but in short periods of peak load that may occur only a few times a year, your applications can handle the extra load by using the additional resources in the cloud.
If your use-case requires it, you can also run a Kubernetes cluster across multiple cloud providers or a combination of any of the options mentioned. This can be done using a single control plane or one control plane in each location.
如果你的使用场景要求,你还可以跨多个云提供商运行Kubernetes集群,或者使用上述任何选项的组合。这可以通过使用单个控制平面或在每个地方使用一个控制平面来完成。

浙公网安备 33010602011771号