apiVersion: v1 kind: Service metadata: name: nats labels: app: nats spec: clusterIP: None ports: - name: web port: 8222 protocol: TCP selector: app: nats type: ClusterIP --- apiVersion: v1 kind: Pod metadata: name: nats labels: role: main app: name some: somelabel annotations: co.elastic.metrics/module: nats co.elastic.metrics/metricsets: stats co.elastic.metrics/hosts: '${data.host}:${data.port}' spec: containers: - name: natsqueue image: nats command: ["/nats-server"] args: ["-m", "8222"] ports: - name: web containerPort: 8222 protocol: TCP