elasticsearchkuberneteslogstashfilebeat

http.host: 0.0.0.0 - ERROR lookup logstash : no such host


I'm deploying ELK on k8s but getting error on Filebeat

kubectl describe pod filebeat-filebeat-rpjbg -n elk ///

Error:

Warning  Unhealthy  8s (x5 over 48s)  kubelet            Readiness probe failed: logstash: logstash:5044...
  connection...
    parse host... OK
    dns lookup... ERROR lookup logstash on 10.245.0.10:53: no such host

In logstash values.yaml may be this causing error?

logstashConfig:
  logstash.yml: |
    http.host: 0.0.0.0
    xpack.monitoring.enabled: false

PODS:

NAME                      READY   STATUS    RESTARTS   AGE
elasticsearch-master-0    1/1     Running   0          146m
filebeat-filebeat-rpjbg   0/1     Running   0          5m45s
filebeat-filebeat-v4fxz   0/1     Running   0          5m45s
filebeat-filebeat-zf5w7   0/1     Running   0          5m45s
logstash-logstash-0       1/1     Running   0          14m
logstash-logstash-1       1/1     Running   0          14m
logstash-logstash-2       1/1     Running   0          14m

SVC:

NAME                            TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)             AGE
elasticsearch-master            ClusterIP   10.245.205.251   <none>        9200/TCP,9300/TCP   172m
elasticsearch-master-headless   ClusterIP   None             <none>        9200/TCP,9300/TCP   172m
logstash-logstash               ClusterIP   10.245.104.163   <none>        5044/TCP            16m
logstash-logstash-headless      ClusterIP   None             <none>        9600/TCP            16m

elasticsearch - values.yaml

logstash - values.yaml

filebeat - values.yaml


Solution

  • Filebeat is trying to resolve "logstash", but you don't have a service with that name. You have "logstash-logstash". Try to change filebeat config (line 49 and 116 in filebeat values.yaml) or change the name of your logstash service accordingly.