如何在基于linux的VM上运行的filebeat和kubernetes中运行的logstash(logstash通过入口公开)之间建立连接

如何在基于linux的VM上运行的filebeat和kubernetes中运行的logstash(logstash通过入口公开)之间建立连接,kubernetes,logstash,elastic-stack,kubernetes-ingress,filebeat,Kubernetes,Logstash,Elastic Stack,Kubernetes Ingress,Filebeat,我想在基于linux的VM上运行的filebeat和kubernetes中运行的logstash(logstash通过入口公开)之间建立连接。我已在filebeat.yml文件主机中指定了logstash输出:[“”]。我有多个服务通过入口公开,因此我希望日志存储也通过相同的入口资源公开。连接到入口资源的主机为。我正在使用filebeat.yml的证书自动注册密钥中与example.com关联的TLS/SSL证书的.crt文件来保护filebeat和logstash之间的连接。在kubernet

我想在基于linux的VM上运行的filebeat和kubernetes中运行的logstash(logstash通过入口公开)之间建立连接。我已在filebeat.yml文件主机中指定了logstash输出:[“”]。我有多个服务通过入口公开,因此我希望日志存储也通过相同的入口资源公开。连接到入口资源的主机为。我正在使用filebeat.yml的证书自动注册密钥中与example.com关联的TLS/SSL证书的.crt文件来保护filebeat和logstash之间的连接。在kubernetes上运行的logstash.yml中,我将输入指定为TCP类型,而不是BEATS类型

Logstash服务正在运行ClusterIP类型,并具有以下入口规则

   http:
     paths:
     - backend:
         serviceName: logstash-service
         servicePort: 5044
       path: /logstash
现在,当我运行整个安装程序时,VM上的filebeat会显示错误

  output.go:100#011Failed to connect to backoff(async(tcp://https://example.com/logstash)): lookup https on 168.63.129.16:53: no such host
Jul 29 19:35:16 filebeat[75346]: 2019-07-29T19:35:16.954Z#011INFO#011pipeline/output.go:93#011Attempting to reconnect to backoff(async(tcp://https://example.com/logstash)) with 7 reconnect attempt(s)
Jul 29 19:35:16 filebeat[75346]: 2019-07-29T19:35:16.954Z#011DEBUG#011[logstash]#011logstash/async.go:111#011connect
Jul 29 19:35:16 filebeat[75346]: 2019-07-29T19:35:16.957Z#011WARN#011transport/tcp.go:53#011DNS lookup failure "https": lookup https on 168.63.129.16:53: no such host

这种设置在技术上是否可行?我应该在filebeat中指定的主机应该是什么,日志存储输入类型应该是什么?指定filebeat中指定的tls.crt是否有助于使用/logstash进行身份验证?

看起来您想要使用具有无效主机名的自签名SSL证书。 有两种方法可以使主机名在您的自我管理网络中工作:

  • 在/etc/hosts中为主机名添加一个IP记录,主机名
    https://example.com/logstash
    将在您的filebeat配置中工作
  • 创建证书和IP地址,更改filebeat配置,使用IP而不是
    https://example.com/logstash
    hostname