parsing YAML file etcconfigprometheus.yml: yaml: line 160: mapping values are not allowed in this

xiaoxiao2021-02-28  0

The problem is that the configmap is missing a linebreak.

target_label: kubernetes_pod_namealerting: alertmanagers:

needs to be

target_label: kubernetes_pod_name alerting: alertmanagers:

Deploy prometheus, and then run

kubectl edit configmap prometheus-prometheus-server

Remember to add correct indentation. Then save, and prometheus will start.

The problem is that prometheus only scrape itself for some reason. It ignores the other targets in the configmap. I think its because prometheus doesnt have access rights (RBAC) to anything but itself.