apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: nginadaemon
spec:
  selector:
    matchLabels:
      app: nginxdaemonset
  template:
    metadata:
      labels:
        app: nginxdaemonset
    spec:
      tolerations:
      # this toleration is to have the daemonset runnable on master nodes
      # remove it if your masters can't run pods
      - key: node-role.kubernetes.io/master
        effect: NoSchedule
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80
        resources:
          limits:
            memory: 200Mi
          requests:
            cpu: 100m
            memory: 200Mi
