Reference: Prometheus on Kubernetes Docs: Configuring your own Prometheus server within Kubernetes
-
wget https://docs.gitlab.com/ce/user/project/integrations/samples/prometheus.yml
-
kubectl apply -f path/to/prometheus.yml
-
Check,
kubectl describe pods -n prometheus
andcurl http://127.0.0.1:8001/api/v1/proxy/namespaces/prometheus/pods/prometheus-441854201-3pmsr:9090/metrics
-
In GitLab integrations, input the http://X.X.X.X:30090