您能告诉kubernetes先启动一个Pod吗? [英] Can you tell kubernetes to start one pod before another?

查看:107
本文介绍了您能告诉kubernetes先启动一个Pod吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以添加一些配置,以便在可以安排其他Pod或将节点指定为就绪之前启动我的守护程序Pod吗?

Can I add some config so that my daemon pods start before other pods can be scheduled or nodes are designated as ready?

添加帖子

这是总共2个不同的Pod,守护程序集是对可能在主机上调度的任何Pod的下游依赖项.

These are 2 different pods altogether, the daemonset is a downstream dependency to any pods that might get scheduled on the host.

推荐答案

没有 Pod层次结构在多种不同类型的Pod之间.含义属于不同的Deployment,Statefulsets,Daemonsets等.换句话说,没有主容器和子容器的概念.如果您想创建自定义层次结构,则可以构建自己的工具,例如,等待DaemonSet中所有Pod的状态开始或创建新的Pod或Kubernetes工作负载资源.

There's no such a thing as Pod hierarchy in Kubernetes between multiple separate types of pods. Meaning belonging to different Deployments, Statefulsets, Daemonsets, etc. In other words, there is no notion of a master pod and children pods. If you like to create your custom hierarchy you can build your own tooling around, for example waiting for the status of all pods in a DaemonSet to start or create a new Pod or Kubernetes workload resource.

在K8中,与Pod依赖关系最接近的是 StatefulSets .

The closest in terms of pod dependency in K8s is StatefulSets.

根据 docs :

对于具有N个副本的StatefulSet,在部署Pod时,将按{0..N-1}的顺序顺序创建它们.

For a StatefulSet with N replicas, when Pods are being deployed, they are created sequentially, in order from {0..N-1}.

这篇关于您能告诉kubernetes先启动一个Pod吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆