调度何时应用于 Pod?
作为我的博士论文的一部分,我正在考虑使用 Kubernetes 作为测试平台来尝试调度算法。这需要以调度程序的形式编写 Kubernetes 扩展。让我对 Kubernetes 感到困惑的是 Pod 生命周期的问题。
据我所知,pod 在部署和启动之前会经历调度过程。我不明白的是,当(1)我们杀死一个 Pod 实例并运行一个新的实例(类似于我们杀死的实例),或者(2)物理节点本身无法运行我们的 Pod,(3 )或者 pod 崩溃的实例?
特别是,我试图证明或反驳我的怀疑,即在这种情况下 Kubernetes 会创建 Pod 的新实例,并将它们推送到与启动期间相同的管道,这将保证触发我尚未实现的自定义调度程序。这里没有使用会跳过调度过程的快捷方式。
参考。符合相关规范。将不胜感激。
预先非常感谢!
As a part of my PhD thesis, I am considering to use Kubernetes as a testing platform for trying out a scheduling algorithm. This would require writing an extension to Kubernetes in the form of a scheduler. What gets me confused about Kubernetes is the matter of a pod lifecycle.
I understand that a pod goes through scheduling process before it gets deployed and started. What I don't understand is what happens when (1) we kill an instance of a pod and run a new one, similar to the one we killed, or (2) the physical node itself becomes unable to run our pod, (3) or the instance of the pod crushes?
In particular, I am trying to prove or disprove my suspicion that in such cases Kubernetes creates new instances of the pod and pushes them through the same pipeline as it would do during startup, which would guarantee that my yet to be implemented custom scheduler is triggered. That no shortcuts that would skip scheduling process are used here.
A ref. to a relevant spec. would be of a great appreciation.
Thanks a lot in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
新的pod将被调度程序调度到一个节点(你可以有一个自定义的调度程序)。
如果 Pod 被管理(例如由 Deployment 创建),最终将创建一个新的 Pod 并调度到另一个节点。但如果 pod 只是一个独立的 pod,那么它就被终止了。
如果实例崩溃,则与上面的
(2)
相同。如果只是 Pod 崩溃,它将在同一节点上重新启动(而不是重新调度)。
A new pod will be scheduled to a node by a scheduler (you can have a custom scheduler).
If the pod is managed (e.g. created by a Deployment), a new pod will be created and scheduled to another node, eventually. But if the pod is just a stand-alone pod, it is just terminated.
Same as for
(2)
above, if the instance crashes.If just the Pod crashes, it will be restarted on the same node (not re-scheduled).