I'm using this prometheus chart. In the documentation it says
In order to get prometheus to scrape pods, you must add annotations to the the pods as below:
metadata: annotations: prometheus.io/scrape: "true" prometheus.io/path: /metrics prometheus.io/port: "8080"
So I have created a service like this
apiVersion: v1
kind: Service
metadata:
name: nodejs-client-service
labels:
app: nodejs-client-app
annotations:
prometheus.io/scrape: "true"
prometheus.io/path: /metrics
prometheus.io/port: "5000"
spec:
type: LoadBalancer
selector:
app: nodejs-client-app
ports:
- protocol: TCP
name: http
port: 80
targetPort: 5000
But my Service won't show up in the prometheus targets. What am I missing?