<p>I went through both <a href="https://stackoverflow.com/questions/36407449/daemonset-doesnt-create-any-pods">daemonset doesn&#39;t create any pods</a> and <a href="https://stackoverflow.com/questions/34818198/daemonset-doesnt-create-any-pods-v1-1-2">DaemonSet doesn&#39;t create any pods: v1.1.2</a> before asking this question. Here is my problem.</p>

<p>Kubernetes cluster is running on CoreOS </p>

<pre><code>NAME=CoreOS
ID=coreos
VERSION=1185.3.0
VERSION_ID=1185.3.0
BUILD_ID=2016-11-01-0605
PRETTY_NAME="CoreOS 1185.3.0 (MoreOS)"
ANSI_COLOR="1;32"
HOME_URL="https://coreos.com/"
BUG_REPORT_URL="https://github.com/coreos/bugs/issues"
</code></pre>

<p>I refer to <a href="https://coreos.com/kubernetes/docs/latest/getting-started.html" rel="nofollow noreferrer">https://coreos.com/kubernetes/docs/latest/getting-started.html</a> guide and created 3 etcd, 2 masters and 42 nodes. All applications running in the cluster without issue. </p>

<p>I got a requirement of setting up logging with fluentd-elasticsearch and downloaded yaml files in  <a href="https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/fluentd-elasticsearch" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/fluentd-elasticsearch</a> deployed fluentd deamonset.</p>

<pre><code>kubectl create -f fluentd-es-ds.yaml
</code></pre>

<p>I could see it got created but none of pod created.</p>

<pre><code>kubectl --namespace=kube-system get ds -o wide
NAME               DESIRED   CURRENT   NODE-SELECTOR                               AGE       CONTAINER(S)   IMAGE(S)                                              SELECTOR
fluentd-es-v1.22   0         0         alpha.kubernetes.io/fluentd-ds-ready=true   4h        fluentd-es     gcr.io/google_containers/fluentd-elasticsearch:1.22   k8s-app=fluentd-es,kubernetes.io/cluster-service=true,version=v1.22

kubectl --namespace=kube-system describe ds fluentd-es-v1.22
Name:           fluentd-es-v1.22
Image(s):       gcr.io/google_containers/fluentd-elasticsearch:1.22
Selector:       k8s-app=fluentd-es,kubernetes.io/cluster-service=true,version=v1.22
Node-Selector:  alpha.kubernetes.io/fluentd-ds-ready=true
Labels:         k8s-app=fluentd-es
                kubernetes.io/cluster-service=true
                version=v1.22
Desired Number of Nodes Scheduled: 0
Current Number of Nodes Scheduled: 0
Number of Nodes Misscheduled: 0
Pods Status:    0 Running / 0 Waiting / 0 Succeeded / 0 Failed
No events.
</code></pre>

<p>I verified below details according to the comments in above SO questions.</p>

<pre><code>kubectl api-versions
apps/v1alpha1
authentication.k8s.io/v1beta1
authorization.k8s.io/v1beta1
autoscaling/v1
batch/v1
batch/v2alpha1
certificates.k8s.io/v1alpha1
extensions/v1beta1
policy/v1alpha1
rbac.authorization.k8s.io/v1alpha1
storage.k8s.io/v1beta1
v1
</code></pre>

<p>I could see below logs in one kube-controller-manager after restart. </p>

<pre><code>I0116 20:48:25.367335       1 controllermanager.go:326] Starting extensions/v1beta1 apis
I0116 20:48:25.367368       1 controllermanager.go:328] Starting horizontal pod controller.
I0116 20:48:25.367795       1 controllermanager.go:343] Starting daemon set controller
I0116 20:48:25.367969       1 horizontal.go:127] Starting HPA Controller
I0116 20:48:25.369795       1 controllermanager.go:350] Starting job controller
I0116 20:48:25.370106       1 daemoncontroller.go:236] Starting Daemon Sets controller manager
I0116 20:48:25.371637       1 controllermanager.go:357] Starting deployment controller
I0116 20:48:25.374243       1 controllermanager.go:364] Starting ReplicaSet controller
</code></pre>

<p>The other one has below log.</p>

<pre><code>I0116 23:16:23.033707       1 leaderelection.go:295] lock is held by {master.host.name} and has not yet expired 
</code></pre>

<p>Am I missing something? Appreciate your help on figure out the issue.</p>

<p>I found the solution after studying <a href="https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/fluentd-elasticsearch/fluentd-es-ds.yaml" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/fluentd-elasticsearch/fluentd-es-ds.yaml</a> </p>

<p>There is <code>nodeSelector: set as alpha.kubernetes.io/fluentd-ds-ready: "true"</code></p>

<p>But nodes doesn't have a label like that. What I did is add the label as below to one node to check whether it's working.</p>

<pre><code>kubectl label nodes {node_name} alpha.kubernetes.io/fluentd-ds-ready="true"
</code></pre>

<p>After that, I could see fluentd pod started to run</p>

<pre><code>kubectl --namespace=kube-system get pods
NAME                                   READY     STATUS    RESTARTS   AGE
fluentd-es-v1.22-x1rid                 1/1       Running   0          6m
</code></pre>

<p>Thanks.</p>
