# Ingesting to Logstash Beat through Istio Gateway Ingress

**URL:** <https://discuss.elastic.co/t/ingesting-to-logstash-beat-through-istio-gateway-ingress/221774>\
**Category:** Logstash\
**Created:** [March 2, 2020, 9:22pm UTC](https://discuss.elastic.co/t/ingesting-to-logstash-beat-through-istio-gateway-ingress/221774 "2020-03-02T21:22:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DougR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dougr/32/48095_2.png) [@DougR](https://discuss.elastic.co/u/DougR)\
**Post date:** [March 2, 2020, 9:22pm UTC](https://discuss.elastic.co/t/ingesting-to-logstash-beat-through-istio-gateway-ingress/221774/1 "2020-03-02T21:22:52Z")

</div>

I have exposed port 5044 through an Istio gateway/virtual service for Logstash beats ingestion. All other ports defined in this gateway/VS are accessible through Istio, but 5044 is not. However, the service it points to is accessible from within my cluster.

```auto
# Source: elk/templates/gateway.yaml
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: elk-gateway
  labels:
    heritage: "Helm"
    release: "elk"
    chart: "elk"
    app: "elk"
  annotations:
spec:
  selector:
    istio: ingressgateway
  servers: 
    - hosts:
      - elk.example.com
      port:
        name: https-kibana
        number: 443
        protocol: HTTPS
      tls:
        mode: PASSTHROUGH
    - hosts:
      - elk.example.com
      port:
        name: http-kibana
        number: 80
        protocol: HTTP
      tls:
        httpsRedirect: true
    - hosts:
      - elk.example.com
      port:
        name: https-elasticsearch
        number: 9200
        protocol: HTTPS
      tls:
        mode: PASSTHROUGH
    - hosts:
      - elk.example.com
      port:
        name: tls-beat
        number: 5044
        protocol: TLS
      tls:
        mode: PASSTHROUGH
---
# Source: elk/templates/virtualservice.yaml
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: "elk-vs"
  labels:
    heritage: "Helm"
    release: "elk"
    chart: "elk"
    app: "elk"
  annotations:
spec:
  gateways: ["elk-gateway"]
  hosts: 
    - elk.example.com
  tls: 
    - match:
      - port: 443
        sni_hosts:
        - elk.example.com
      route:
      - destination:
          host: elk-kibana
          port:
            number: 5601
    - match:
      - port: 9200
        sni_hosts:
        - elk.example.com
      route:
      - destination:
          host: elk-es-data-headless
          port:
            number: 9200
    - match:
      - port: 5044
        sni_hosts:
        - elk.example.com
      route:
      - destination:
          host: elk-logstash-beat
          port:
            number: 5044

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 30, 2020, 9:22pm UTC](https://discuss.elastic.co/t/ingesting-to-logstash-beat-through-istio-gateway-ingress/221774/2 "2020-03-30T21:22:54Z")

</div>

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