apiVersion: v1
kind: Service
metadata:
  name: fluentd
  namespace: logging
  labels:
    k8s-app: fluentd
spec:
  type: ClusterIP
  clusterIP: None
  selector:
    k8s-app: fluentd
  ports:
  # 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:monitor-agent/api/plugins.json
  - name: monitor-agent
    port: 24220
    targetPort: monitor-agent
    protocol: TCP
