3

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

Adding post edit:

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

Rico
  • 58,485
  • 12
  • 111
  • 141
user2062360
  • 1,323
  • 5
  • 16
  • 29

1 Answers1

3

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.

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

As per the docs:

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

Rico
  • 58,485
  • 12
  • 111
  • 141
  • Is there a node readiness concept ? similar to a pod-readiness probe ? – user2062360 Nov 16 '18 at 21:40
  • 1
    Yes, but it's not something that you can modify. It's used internally within Kubernetes. More info [here](https://kubernetes.io/docs/concepts/architecture/nodes/#manual-node-administration) You can actually configure [eviction thresholds](https://kubernetes.io/docs/tasks/administer-cluster/out-of-resource/) what does this have to do with pod start dependency? – Rico Nov 16 '18 at 21:44
  • I was hoping that orchestrate a way so that my node could be `schedulable` only after my daemon sets are running. – user2062360 Nov 16 '18 at 21:47
  • 1
    Oh you can do that with [taints and tolerations](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/) – Rico Nov 16 '18 at 21:50
  • @Rico How exactly would taints and tolerations help with ensuring the DaemonSet pods are running before the other Pods are scheduled/started? – Fabian Schmied Apr 18 '23 at 14:20
  • @FabianSchmied you probably have to write a custom scheduler. i.e: https://kubernetes.io/blog/2020/12/21/writing-crl-scheduler/ – Rico Apr 18 '23 at 20:21