调度何时应用于 Pod?

发布于 2025-01-09 21:29:48 字数 387 浏览 1 评论 0原文

作为我的博士论文的一部分,我正在考虑使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

番薯 2025-01-16 21:29:48

(1) ...运行一个新的,类似于我们杀死的

新的pod将被调度程序调度到一个节点(你可以有一个自定义的调度程序)。

(2) 物理节点本身无法运行我们的 Pod

如果 Pod 被管理(例如由 Deployment 创建),最终将创建一个新的 Pod 并调度到另一个节点。但如果 pod 只是一个独立的 pod,那么它就被终止了。

(3) 或者 Pod 实例崩溃了?

如果实例崩溃,则与上​​面的 (2) 相同。
如果只是 Pod 崩溃,它将在同一节点上重新启动(而不是重新调度)。

(1) ... run a new one, similar to the one we killed

A new pod will be scheduled to a node by a scheduler (you can have a custom scheduler).

(2) the physical node itself becomes unable to run our pod

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.

(3) or the instance of the pod crashes?

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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文