# Opensearch with istio

**URL:** <https://forum.opensearch.org/t/opensearch-with-istio/14290>\
**Category:** Kubernetes\
**Tags:** configure\
**Created:** [May 10, 2023, 12:47pm UTC](https://forum.opensearch.org/t/opensearch-with-istio/14290 "2023-05-10T12:47:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danjin](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@Danjin](https://forum.opensearch.org/u/Danjin)\
**Post date:** [May 10, 2023, 12:47pm UTC](https://forum.opensearch.org/t/opensearch-with-istio/14290/1 "2023-05-10T12:47:01Z")

</div>

**Versions**  
operator 2.3  
opensearch 2.3

**Describe the issue** :  
unfortunately we can’t get istio to run together with opensearch.

so far we have done everything with Elastic and would like to switch to opensearch.  
At Elastic we only need to set these settings and it works as expected

> http:  
> tls:  
> selfSignedCertificate:  
> disabled: true

> annotations:  
> [traffic.sidecar.istio.io/includeInboundPorts:](http://traffic.sidecar.istio.io/includeInboundPorts:) “\*”  
> [traffic.sidecar.istio.io/excludeOutboundPorts:](http://traffic.sidecar.istio.io/excludeOutboundPorts:) “9300”  
> [traffic.sidecar.istio.io/excludeInboundPorts:](http://traffic.sidecar.istio.io/excludeInboundPorts:) “9300”

unfortunately, it seems that tls cannot be completely disabled in opensearch + dashboards and thus we encounter certificate errors as soon as we add only the annotations.

while browsing the forum I could already find some others who have had a similar usecase. Unfortunately I could not find a suitable solution there.

hopefully someone can give me a good hint.

best regards,  
Danjin

---

<div class="post-metadata">

**Author:** ![Gsmitt](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gsmitt/32/1718_2.png) [@Gsmitt](https://forum.opensearch.org/u/Gsmitt)\
**Post date:** [May 11, 2023, 3:30am UTC](https://forum.opensearch.org/t/opensearch-with-istio/14290/2 "2023-05-11T03:30:44Z")

</div>

Hey @Danjin

> [@Danjin](#):
>
> unfortunately, it seems that tls cannot be completely disabled in opensearch + dashboards and thus we encounter certificate errors as soon as we add only the annotations.

Have you tried putting logstash infront of Opensearch?

---

<div class="post-metadata">

**Author:** ![Danjin](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@Danjin](https://forum.opensearch.org/u/Danjin)\
**Post date:** [May 11, 2023, 7:19am UTC](https://forum.opensearch.org/t/opensearch-with-istio/14290/3 "2023-05-11T07:19:23Z")

</div>

@Gsmitt not yet. I am not sure how logstash can help to disable tls between dashboards and opensearch

---

<div class="post-metadata">

**Author:** ![Gsmitt](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gsmitt/32/1718_2.png) [@Gsmitt](https://forum.opensearch.org/u/Gsmitt)\
**Post date:** [May 11, 2023, 10:05pm UTC](https://forum.opensearch.org/t/opensearch-with-istio/14290/4 "2023-05-11T22:05:57Z")

</div>

Hey @Danjin

I was going of this statement.

> [@Danjin](#):
>
> unfortunately, it seems that tls cannot be completely disabled in opensearch + dashboards and thus we encounter certificate errors as soon as we add only the annotations.

My idea was using logstash. The input could be used without certificates and the connection from Logstash → Openseach could use certificates and/or credentials.

Example:

```auto
# Sample Logstash configuration for creating a simple
# Beats -> Logstash -> Opensearch pipeline.

input {
  beats {
    port => 5044
  }
}

output {
  elasticsearch {
    hosts => ["http://localhost:9200"]
    index => "%{[@metadata][beat]}-%{[@metadata][version]}-%{+YYYY.MM.dd}"
    user => "admin"
    password => "changeme"
  }
}

```

---

<div class="post-metadata">

**Author:** ![Danjin](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@Danjin](https://forum.opensearch.org/u/Danjin)\
**Post date:** [May 12, 2023, 9:27am UTC](https://forum.opensearch.org/t/opensearch-with-istio/14290/5 "2023-05-12T09:27:20Z")

</div>

I probably did not express myself clearly. I meant with add annotations:

> ```
> annotations:
> traffic.sidecar.istio.io/includeInboundPorts: "*"
> traffic.sidecar.istio.io/excludeOutboundPorts: "9300"
> traffic.sidecar.istio.io/excludeInboundPorts: "9300"
> 
> ```

at the moment i dont have any problems with adding data to opensearch because i dont have a stable opensearch cluster + frontend. Opensearch can’t communicate with itselfs or dashboards.

---

<div class="post-metadata">

**Author:** ![Danjin](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@Danjin](https://forum.opensearch.org/u/Danjin)\
**Post date:** [May 17, 2023, 11:30am UTC](https://forum.opensearch.org/t/opensearch-with-istio/14290/6 "2023-05-17T11:30:45Z")

</div>

we found a way to use istio + opensearch in the same namespace.  
if someone is interested, here is the configuration:

namespace.yaml

```auto
apiVersion: v1
kind: Namespace
metadata:
  name: my-namespace
  labels:
    istio-injection: enabled

```

peer-authentication.yaml

```auto
apiVersion: security.istio.io/v1beta1
kind: PeerAuthentication
metadata:
  name: mtls-policy
  namespace: my-namespace
spec:
  mtls:
    mode: STRICT

```

opensearch.yaml

```auto
apiVersion: opensearch.opster.io/v1
kind: OpenSearchCluster
metadata:
  name: my-first-cluster
  namespace: my-namespace
spec:
  general:
    httpPort: 9200
    serviceName: my-first-cluster
    version: 2.7.0

  dashboards:
    annotations:
      traffic.sidecar.istio.io/includeInboundPorts: "*"
      traffic.sidecar.istio.io/excludeOutboundPorts: "9200,9300"
      traffic.sidecar.istio.io/excludeInboundPorts: "9200,9300"
    version: 2.7.0
    enable: true
    replicas: 1
    resources:
      requests:
         memory: "512Mi"
         cpu: "200m"
      limits:
         memory: "512Mi"
         cpu: "200m"

  nodePools:
    - component: nodes
      replicas: 3
      diskSize: "5Gi"
      nodeSelector:
      resources:
         requests:
            memory: "2Gi"
            cpu: "500m"
         limits:
            memory: "2Gi"
            cpu: "500m"
      roles:
        - "cluster_manager"
        - "data"
      annotations:
        traffic.sidecar.istio.io/includeInboundPorts: "*"
        traffic.sidecar.istio.io/excludeOutboundPorts: "9200,9300"
        traffic.sidecar.istio.io/excludeInboundPorts: "9200,9300"

```

best regards,  
Danjin

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/mauve_hedgehog/original/2X/3/33547ea01a5b12dcca2958411d3edd97ae2ea8c1.png) [@system](https://forum.opensearch.org/u/system)\
**Post date:** [July 16, 2023, 11:31am UTC](https://forum.opensearch.org/t/opensearch-with-istio/14290/7 "2023-07-16T11:31:20Z")

</div>

Closed on July 16, 2023, 11:31am UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
