Kube-State-Metrics

❗️

Warning

We do not recommend bringing a custom kube-state-metrics. This can lead to silent data loss and inaccurate data.

By default, CloudZero ships with a preconfigured version of kube-state-metrics that is tuned and isolated to
CloudZero's install. We recommend using our default version.

Overview

The CloudZero agent for Kubernetes requires an instance of kube-state-metrics. By default, CloudZero's agent will take care of this. However, using the advanced configuration below, you are able to point the agent at your own instance of kube-state-metrics, though it is not recommended.

Getting Started

  1. Add the following to your values.yaml file and re-deploy.
  kubeStateMetrics:
    # Set enabled:false to disable the built in KSM
    enabled: false
    # Disable CloudZero KSM as a Scrape Target since the service endpoint is explicitly defined
    # by the Validators config file.
    prometheusScrape: false
    # Overriding static scrape target address for an existing KSM.
    # Set to service <service-name>.<namespace>.svc.cluster.local:port if built-in is disabled (`enabled=false` above)
    targetOverride: <URL_TO_YOUR_KSM>
  1. Re-deploy the agent with your updated values file.
helm upgrade --install cloudzero \
    --repo https://cloudzero.github.io/cloudzero-charts cloudzero-agent \
    --namespace cloudzero --create-namespace -f values.yaml