<p>so I am currently connected to a contabo hosted kubernetes cluster. On there I have running kafka and opensearch/opensearch dashboards deployements. I am trying to run logstash so that I can get the data from a kafka topic to opensearch, <a href="https://hub.docker.com/r/opensearchproject/logstash-oss-with-opensearch-output-plugin" rel="nofollow noreferrer">https://hub.docker.com/r/opensearchproject/logstash-oss-with-opensearch-output-plugin</a> this is the image that I use for logstash (<a href="https://justpaste.it/47676" rel="nofollow noreferrer">https://justpaste.it/47676</a> this is my logstash configuration). And the following is my opensearch configuration  <a href="https://justpaste.it/a090p" rel="nofollow noreferrer">https://justpaste.it/a090p</a>
When I deploy logstash, I successfully get the data from the kafka topic, so my input plugin is working as expected, but the output is not, I am failing to output data to opensearch from logstash. The following is the logs from the logstash pod: <a href="https://justpaste.it/620g4" rel="nofollow noreferrer">https://justpaste.it/620g4</a> .</p>
<p>This is the output of &quot;kubectl get services&quot;</p>
<pre><code>NAME                                  TYPE           CLUSTER-IP       EXTERNAL-IP   
PORT(S)                               AGE
dashboards-opensearch-dashboards      ClusterIP      10.96.114.252    &lt;none&gt;        5601/TCP                              5d20h
grafana                               ClusterIP      10.107.83.28     &lt;none&gt;        3000/TCP                              44h
logstash-service                      LoadBalancer   10.102.132.114   &lt;pending&gt;     5044:31333/TCP                        28m
loki                                  ClusterIP      10.99.30.246     &lt;none&gt;        3100/TCP                              43h
loki-headless                         ClusterIP      None             &lt;none&gt;        3100/TCP                              43h
my-cluster-kafka-0                    NodePort       10.101.196.50    &lt;none&gt;        9094:32000/TCP                        53m
my-cluster-kafka-1                    NodePort       10.96.247.75     &lt;none&gt;        9094:32001/TCP                        53m
my-cluster-kafka-2                    NodePort       10.98.203.5      &lt;none&gt;        9094:32002/TCP                        53m
my-cluster-kafka-bootstrap            ClusterIP      10.111.178.24    &lt;none&gt;        9091/TCP,9092/TCP,9093/TCP            53m
my-cluster-kafka-brokers              ClusterIP      None             &lt;none&gt;        9090/TCP,9091/TCP,9092/TCP,9093/TCP   53m
my-cluster-kafka-external-bootstrap   NodePort       10.109.134.74    &lt;none&gt;        9094:32100/TCP                        53m
my-cluster-zookeeper-client           ClusterIP      10.98.157.173    &lt;none&gt;        2181/TCP                              54m
my-cluster-zookeeper-nodes            ClusterIP      None             &lt;none&gt;        2181/TCP,2888/TCP,3888/TCP            54m
opensearch-cluster-master             ClusterIP      10.98.55.121     &lt;none&gt;        9200/TCP,9300/TCP                     19h
opensearch-cluster-master-headless    ClusterIP      None             &lt;none&gt;        9200/TCP,9300/TCP                     19h
prometheus-operated                   ClusterIP      None             &lt;none&gt;        9090/TCP                              25m
prometheus-operator                   ClusterIP      None             &lt;none&gt;        8080/TCP                              50m
</code></pre>
<p>What am I doing wrong and how do I establish this connection?</p>

MarkoFire
<p>I figured it out. I think that it was expecting an ssl certificate and that is why it was refusing the connection. The way that I &quot;fixed&quot; this (because I don't need the ssl certification for this project for now) is that I changed the logstash configuration in this way.</p>
<pre><code>  logstash.conf: |
    input {
        kafka{
          codec =&gt; json
          bootstrap_servers =&gt; &quot;10.111.178.24:9092&quot;
          topics =&gt; [&quot;t_events&quot;]
        }
    }
    output {
       opensearch {
          hosts       =&gt; [&quot;https://10.102.102.109:9200&quot;]
          ssl_certificate_verification =&gt; false
          user        =&gt; &quot;admin&quot;
          password    =&gt; &quot;admin&quot;
          index       =&gt; &quot;logstash-logs-%{+YYYY.MM.dd}&quot;
        }
    }
</code></pre>
<p>So I have added the &quot;ssl_certificate_verification =&gt; false&quot; line to the config and that enabled me to connect from logstash to opensearch and send the data. Now I have the data encryption aspect by using a https protocol but I am lacking the ssl authentication which I am fine with for this project.</p>
