Logstash not able to connect to Elasticsearch deployed on Kubernetes cluster Logstash not able to connect to Elasticsearch deployed on Kubernetes cluster kubernetes kubernetes

Logstash not able to connect to Elasticsearch deployed on Kubernetes cluster


I am now able to connect logstash with elasticsearch, if you are using elasticsearch with dns name, logstash by default will take the port of elasticsearch as 9200, so in my case it was taking the elasticsearch url as https://my-server.com:9200/elasticsearch-development/. But with that url, elasticsearch was not accessible, it was only accessible with (https://myserver.com/elasticsearch-development/). So I need to add the https port i.e 443 in my elasticsearch url, through which the logstash would be able to connect to elasticserach (https://my-server.com:443/elasticsearch-development/)

Long story short:-

In deployment.yaml file under env variable XPACK_MONITORING_ELASTICSEARCH_HOSTS and XPACK_MONITORING_ELASTICSEARCH_URL given the value as https://my-server.com:443/elasticsearch-development/

Same value was given in logstash.conf file.