K8s Scheduling DaemonSets

1/3/2019

I would like to schedule a pod on all nodes of a cluster. No exceptions. DaemonSet seems like do the job when there is no shortage of resources. But sometimes other pods get scheduled on certain nodes as such that there are no more resources left for the pod of the DaemonSet to be scheduled.

What is the best way to force pods of DaemonSet to be scheduled on all nodes? Running on GCP so the newest version available is 1.11.5

-- rubenhak
daemonset
kubernetes
scheduler

2 Answers

1/4/2019

Sounds like you may have the default scheduler configured for DaemonSets and your pods are not configured to be preempted (preemption is disabled) in the kube-scheduler configs:

apiVersion: componentconfig/v1alpha1
kind: KubeSchedulerConfiguration
algorithmSource:
  provider: DefaultProvider

...

disablePreemption: true

The default is disablePreemption: false so if your pods are not being preempted to allow the daemon set to be scheduled there is something else wrong.

If you are using the DaemonSet scheduler (default on k8s 1.11 or earlier) DaemonSet pods should be scheduled regardless. (If they are not then again there's something else wrong).

-- Rico
Source: StackOverflow

1/29/2019

Turns out this gets solved in k8s 1.12 and above. They made the default scheduler to handle daemon sets.

-- rubenhak
Source: StackOverflow