apiVersion: apps/v1 kind: DaemonSet metadata: labels: app: elasticsearch . . .

balaji:
apiVersion: apps/v1
kind: DaemonSet
metadata:

labels:
app: elasticsearch
name: elasticsearch
namespace: kube-system
spec:

selector:
matchLabels:
app: elasticsearch

template:
metadata:

  labels:
    app: elasticsearch

spec:
containers:
- image: http://k8s.gcr.io/fluentd-elasticsearch:1.20|k8s.gcr.io/fluentd-elasticsearch:1.20
name: fluentd-elasticsearch

irobochitti:
Spec above the containers is not intend properly

https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/
Example:

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: fluentd-elasticsearch
  namespace: kube-system
  labels:
    k8s-app: fluentd-logging
spec:
  selector:
    matchLabels:
      name: fluentd-elasticsearch
  template:
    metadata:
      labels:
        name: fluentd-elasticsearch
    spec:
      tolerations:
      # this toleration is to have the daemonset runnable on master nodes
      # remove it if your masters can't run pods
      - key: <http://node-role.kubernetes.io/master|node-role.kubernetes.io/master>
        effect: NoSchedule
      containers:
      - name: fluentd-elasticsearch
        image: <http://quay.io/fluentd_elasticsearch/fluentd:v2.5.2|quay.io/fluentd_elasticsearch/fluentd:v2.5.2>

Tej_Singh_Rana:
Hello, @balaji
Above manifest is working fine.

apiVersion: apps/v1
kind: DaemonSet
metadata:
  labels:
    app: elasticsearch
  name: elasticsearch
  namespace: kube-system
spec:
  selector:
    matchLabels:
      app: elasticsearch
  template:
    metadata:
      labels:
        app: elasticsearch
    spec:
      containers:
      - image: <http://k8s.gcr.io/fluentd-elasticsearch:1.20|k8s.gcr.io/fluentd-elasticsearch:1.20>
        name: fluentd-elasticsearch

balaji:
thanks its now working