prometheus-operator / kube-prometheus

Use Prometheus to monitor Kubernetes and applications running on Kubernetes
https://prometheus-operator.dev/
Apache License 2.0
6.64k stars 1.92k forks source link

customizations all namespaces is broken #2491

Open k8s-1 opened 3 weeks ago

k8s-1 commented 3 weeks ago

What happened?

Applied customizations all namespaces in kind cluster -> https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/customizations/monitoring-all-namespaces.md, got error: resource mapping not found for name: "k8s" namespace: "monitoring" from "manifests/prometheus-prometheus.yaml": no matches for kind "Prometheus" in version "monitoring.coreos.com/v1"

Next, checked prometheus UI in http://localhost:9090/targets?search= -> No scrape pools configured

Did you expect to see some different? Expected to see no error, scrape pools showing up in UI

How to reproduce it (as minimally and precisely as possible): Apply the jsonnet https://github.com/prometheus-operator/kube-prometheus/blob/main/docs/customizations/monitoring-all-namespaces.md to a clean cluster

Environment kind/kubeadm


* Manifests:

not relevant


* Prometheus Operator Logs:

not relevant


* Prometheus Logs:

not relevant



**Anything else we need to know?**:
k8s-1 commented 3 weeks ago

Looks like the namespace monitoring isn't created during the operation and that causes the kubectl apply to fail after jsonnet build, after that it's unclear why nothing shows up in UI