Sign in
agent:

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

# 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
  1. 1

    Do a rollout restart of the prometheus-server for the edited config map to take effect on the minikube cluster

    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

    # after editing the config map do a rollout restart if needed kubectl rollout restart deployment prometheus-server -n monitoring
    copied
    1