In the Daemon Set Lab, when I create a DaemonSet yaml `(elastic.yml)` and apply, . . .

Sayan Mondal:
In the Daemon Set Lab, when I create a DaemonSet yaml (elastic.yml) and apply, it gives me these validation warnings and mentions them as a required field however in the official docs the yaml Kubernetes provides doesn’t have these under spec, also I could create a daemon set by setting --validate=false

error: error validating "elastic.yml": error validating data: [ValidationError(DaemonSet.status): missing required field "currentNumberScheduled" in io.k8s.api.apps.v1.DaemonSetStatus, ValidationError(DaemonSet.status): missing required field "numberMisscheduled" in io.k8s.api.apps.v1.DaemonSetStatus, ValidationError(DaemonSet.status): missing required field "desiredNumberScheduled" in io.k8s.api.apps.v1.DaemonSetStatus, ValidationError(DaemonSet.status): missing required field "numberReady" in io.k8s.api.apps.v1.DaemonSetStatus]; if you choose to ignore these errors, turn validation off with --validate=false

If these are required fields should they be under spec or under spec.container. Any information around this would be helpful, thanks.

Fernando Jimenez:
Could you post your elastic.yml?

Sayan Mondal:
Sure

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

Fernando Jimenez:
Please, remove the last line status: {} and try again.