ElasticSearch for logging in Kubernetes cannot work

1/16/2019

ElasticSearch pod is up and running , Kibana is working but cannot connect to the ElasticSearch ( connection refused in logs )

Dears, I have 3 nodes Kubernetes cluster with 1 master and 2 workers . i am trying to deploy ElasticSearch (Testing environment only ) for logging. I followed the details here.

I only set the replicas of the ElasticSearch to 1 instead of two because i do not have enough memory. - I run Kibana as Nodeport and can open it but it gives error ( Cannot connect to ElasticSearch)

kubectl get svc --namespace=kube-system

NAME                    TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE

elasticsearch-logging   ClusterIP   10.106.231.74    <none>        9200/TCP         
kibana-logging          NodePort    10.111.199.12    <none>        5601:30461/TCP   5h44m                ClusterIP   10.96.0.10       <none>      
  • I tried to ping from the Kibana pod to ElasticSearch pod and it is pingable
  • I tried to curl http://10.106.231.74:9200 ( service IP ) from all hosts and from the Kibana pod and i get everytime Failed connect to 10.106.231.74:9200; Connection refused
  • I tried to curl 127.0.0.1:9200 from inside the ElasticSearch pod and also connection refused.

All Yaml files are exactly as provided in above link

I expect any response at least from inside the ElasticSearch pod but all the trials returned connection refused. The Yamls are all in link and all RBAC rules are ok.

-- Sam
elasticsearch
kibana
kubernetes

0 Answers