Failure to run Filebeat On K8s Cluster - using KubeCTL

I've followed instructions from: https://www.elastic.co/blog/shipping-kubernetes-logs-to-elasticsearch-with-filebeat

which seems pretty simple and would log my K8S cluster.

now i get this:

ubuntu@ip-10-0-32-203:~/kublog$ kubectl create -f filebeat-kubernetes.yaml
configmap "filebeat-config" created
configmap "filebeat-prospectors" created
clusterrolebinding "filebeat" created
clusterrole "filebeat" created
serviceaccount "filebeat" created
Error from server (BadRequest): error when creating "filebeat-kubernetes.yaml": DaemonSet in version "v1beta1" cannot be handled as a DaemonSet: v1beta1.DaemonSet: Spec: v1beta1.DaemonSetSpec: Template: v1.PodTemplateSpec: Spec: v1.PodSpec: Containers: v1.Container: v1.Container: Env: v1.EnvVar: v1.EnvVar: Value: ReadString: expects " or n, parsing 550 ...,"value":1... at {"apiVersion":"extensions/v1beta1","kind":"DaemonSet","metadata":{"labels":{"k8s-app":"filebeat","kubernetes.io/cluster-service":"true"},"name":"filebeat","namespace":"kube-system"},"spec":{"template":{"metadata":{"labels":{"k8s-app":"filebeat","kubernetes.io/cluster-service":"true"}},"spec":{"containers":[{"args":["-c","/etc/filebeat.yml","-e"],"env":[{"name":"ELASTICSEARCH_HOST","value":"elastic.dev.com"},{"name":"ELASTICSEARCH_PORT","value":"9200"},{"name":"ELASTICSEARCH_USERNAME","value":"elastic"},{"name":"ELASTICSEARCH_PASSWORD","value":12345678},{"name":"ELASTIC_CLOUD_ID","value":null},{"name":"ELASTIC_CLOUD_AUTH","value":null},{"name":"POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}}],"image":"docker.elastic.co/beats/filebeat:6.0.1","name":"filebeat","resources":{"limits":{"memory":"200Mi"},"requests":{"cpu":"100m","memory":"100Mi"}},"securityContext":{"runAsUser":0},"volumeMounts":[{"mountPath":"/etc/filebeat.yml","name":"config","readOnly":true,"subPath":"filebeat.yml"},{"mountPath":"/usr/share/filebeat/prospectors.d","name":"prospectors","readOnly":true},{"mountPath":"/usr/share/filebeat/data","name":"data"},{"mountPath":"/var/lib/docker/containers","name":"varlibdockercontainers","readOnly":true}]}],"serviceAccountName":"filebeat","terminationGracePeriodSeconds":30,"volumes":[{"configMap":{"defaultMode":384,"name":"filebeat-config"},"name":"config"},{"hostPath":{"path":"/var/lib/docker/containers"},"name":"varlibdockercontainers"},{"configMap":{"defaultMode":384,"name":"filebeat-prospectors"},"name":"prospectors"},{"emptyDir":{},"name":"data"}]}}}}
ubuntu@ip-10-0-32-203:~/kublog$ kubectl delete -f filebeat-kubernetes.yaml
configmap "filebeat-config" deleted
configmap "filebeat-prospectors" deleted
clusterrolebinding "filebeat" deleted
clusterrole "filebeat" deleted
serviceaccount "filebeat" deleted
Error from server (NotFound): error when stopping "filebeat-kubernetes.yaml": daemonsets.extensions "filebeat" not found

PASSWORD WITH ""
that caused it.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.