Logstash can't connect to Elasticsearch

Hi guys.

I'm trying to connect to Elasticsearch from Logstash, but it fails due to certificate issues. To give some background data: Version 8.1.3 on Kubernetes with Rancher. I build a couple of kustomization yaml files to orchestrate the installation. (I can provide them if needed)

On Elasticsearch side I get "http client did not trust this server's certificate" and on logstash "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"

Since we want to use ELK only within the company we really don't need HTTPS, because our cloud environment is not reachable externally. So I tried out this from this page (TLS certificates | Elastic Cloud on Kubernetes [2.2] | Elastic) :

spec:
http:
tls:
selfSignedCertificate:
disabled: true

But it seems I'm placing it in the wrong place all the time. Could someone tell me where's the exact place to put it, so I can reach ES via HTTP://es:9200, so I don't have to deal with all those certificate issues? I googled so many placed and I'm finding only small snippets, but no complete example with a mimimal working prototype.

I'm glad for every hint. Thanks guys!

Welcome to our community! :smiley: We aren't all guys though.

We'd need more information here to help.
Are you using ECK?
What does your config look like?
What are the full errors you are seeing?

Hi warkolm.

I found out that I don't need Logstash. Filebeat is enough for me. So I skipped that. After watching dozens of YT videos I finally got the logs into my ES.... sigh

And btw: to be exact, guys is for both male and female. But I will write a more gender-neutral term next time :slight_smile:
Thanks anyways for your help and wishing you a wonderful weekend.