简体   繁体   English

Docker Swarm和Kubernetes如何验证其管理选择?

[英]How Docker Swarm and Kubernetes validate their management choices?

Docker Swarm and Kubernetes are two systems to manage applications on several nodes. Docker Swarm和Kubernetes是用于管理多个节点上的应用程序的两个系统。 If a node is draining or its load is very high they start some procedure to maintain the desired state described in the requirements. 如果节点正在排水或其负载非常高,则它们将启动一些过程以维持需求中所述的所需状态。

Of course, when they manage the application over the infrastructure, they have to take some choices in order to modify the state. 当然,当他们通过基础架构管理应用程序时,他们必须做出一些选择才能修改状态。 How the decisions are taken in order to ensure that the decisions don't damage the system? 为了确保决策不会损害系统,如何做出决策?

I mean, not when the actions are triggered (system analysis) but how can we prove that the decision taken are the best decision to resolve the problem? 我的意思是,不是在触发操作时(系统分析),而是如何证明所做出的决定是解决问题的最佳决定? There is some documentation on that? 有一些文档吗? I don't find any referring to this topic. 我没有找到任何有关此主题的信息。

For example: I have a node which resources are almost free. 例如:我有一个几乎所有资源都可用的节点。 Then, at a certain moment, their resources became insufficient, and remain insufficient just for a second, then return free. 然后,在某个时刻,他们的资源变得不足,仅一秒钟就保持不足,然后释放。 If the manager migrates applications from that node to another one because of that second of insufficient resources has trigged the migration functions, probably it will create more problem than solved ones since the insufficient resources problem are already passed and no migration was really required. 如果管理器由于资源不足的那一秒触发了迁移功能而将应用程序从该节点迁移到另一个节点,则可能会比已解决的问题产生更多的问题,因为已经解决了资源不足的问题,并且确实不需要迁移。

Kubernetes not validate their management choice it just spawn on pods on any node where you have resources. Kubernetes不会验证其管理选择,它只是在您拥有资源的任何节点上的Pod上生成。 But if you want to manage how it works with resources you could use resources limits. 但是,如果您要管理资源的使用方式,则可以使用资源限制。

Also if you have this behavior when during some migration your application use a lot of resource for a short period and you don't want to Kubernetes move this pods anywhere you could start use pod soft affinity you application will try to spawn only on nods which you want, and only if it has no resources or possibility it will spawn pod in another node. 另外,如果您在某些迁移期间您的应用程序在短时间内使用大量资源并且您不希望Kubernetes将此Pod移到可以开始使用Pod软关联的任何位置时出现这种行为,则您的应用程序将尝试仅在点头上生成您想要的,并且只有当它没有资源或可能性时,它才会在另一个节点中生成Pod。

Swarm will not move a container because resources change in real time. Swarm不会移动容器,因为资源会实时更改。 You can control how it's initially scheduled with resource reservations and limits, but if something else eats up node resources, it won't move a healthy app. 您可以通过资源预留和限制来控制其初始调度方式,但是如果其他因素吞噬了节点资源,它将无法运行正常的应用程序。

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

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