apiVersion: v1
kind: Service
metadata:
  name: elkhost
spec:
  type: ClusterIP
  ports:
    - port: 5044 #ClusterIP的方式对外暴露，这样其他pod的filebeat就可以通过服务名加5044端口来访问logstash服务了
      targetPort: 5044 #
  selector:
    name: elkhost