apiVersion: v1
kind: Service
metadata:
  name: fluentd-aggregator
  namespace: logging
  labels:
    k8s-app: fluentd-aggregator
spec:
  type: ClusterIP
  selector:
    k8s-app: fluentd-aggregator
  ports:
  - name: fluentd-input
    port: 24224
    targetPort: fwd-input
    protocol: TCP
  - name: fluentd-input-udp
    port: 24224
    targetPort: fwd-input-udp
    protocol: UDP
  # Exposes Prometheus metrics
  - name: prometheus-metrics
    port: 24231
    targetPort: prom-metrics
    protocol: TCP
  # Can be accessed using "kubectl proxy" at:
  # http://127.0.0.1:8001/api/v1/proxy/namespaces/kube-system/services/fluentd-aggregator:monitor-agent/api/plugins.json
  - name: monitor-agent
    port: 24220
    targetPort: monitor-agent
    protocol: TCP
