agent: |
OPAY4sEBtysYLa9bmlUBEdit Prometheus server config map to scrape the kube-state-metrics being exposed
Edit Prometheus server config map to scrape the kube-state-metrics being exposed
There was a problem that the LLM was not able to address. Please rephrase your prompt and try again.
kubectl get cm
kubectl edit cm <config_map_name> -n monitoring
# For Example
kubectl edit cm prometheus-server -n monitoring
# Add a scraping job in prometheus-server cm under scrape configs
- job_name: state_metrics
static_configs:
- targets:
- prometheus-kube-state-metrics.monitoring.svc.cluster.local:8080
After doing a rollout restart of the prometheus-server we can access the kube-state-metrics from the grafana/prometheus
inputs
outputs
# Can be skipped if doing step 9
kubectl get cm
kubectl edit cm <config_map_name> -n monitoring
# For Example
kubectl edit cm prometheus-server -n monitoring
# Add a scraping job in prometheus-server cm under scrape configs
- job_name: state_metrics
static_configs:
- targets:
- prometheus-kube-state-metrics.monitoring.svc.cluster.local:8080
copied
- 1qSdY4WIleWmdTbEbGs0WDo a rollout restart of the prometheus-server for the edited config map to take effect on the minikube cluster
1
There was a problem that the LLM was not able to address. Please rephrase your prompt and try again.After this we can access the kube-state-metrics from the grafana/prometheus
inputsoutputs# after editing the config map do a rollout restart if needed kubectl rollout restart deployment prometheus-server -n monitoringcopied1