Configuration

When configuring kube-state-metrics, other than all the required RBAC permissions, there are also several runtime flags to be aware of. We will provide an overview of the more relevant ones for our test case in the following table:

Flag

Description

--host

IP to bind and expose Kubernetes metrics on, defaults to 0.0.0.0

--port

Port to expose Kubernetes metrics, defaults to 80

--telemetry-host

IP to expose internal metrics, defaults to 0.0.0.0

--telemetry-port

Port to expose internal metrics, defaults to 80

--collectors

Comma-separated list of metrics groups to enable, defaults to ConfigMap, CronJobs, DaemonSets, Deployments, endpoints, horizontalpodautoscalers, Jobs, LimitRanges, namespaces, Nodes, PersistentVolumeClaims, PersistentVolumes, PodDisruptionBudgets, pods, ReplicaSets, ReplicationControllers, resource quotas, Secrets, services, StatefulSets

--metric-blacklist

Comma-separated list of metrics to disable, mutually exclusive with the whitelist

--metric-whitelist

Comma-separated list of metrics to enable, mutually exclusive with the blacklist

Due to the unpredictable amount of objects required to be exported, which are directly proportional to the size of the cluster, a common pattern when deploying kube-state-metrics is to use a special container called addon-resizer, which can vertically resize the exporter pod dynamically. Information regarding addon-resizer can be found at https://github.com/kubernetes/autoscaler/tree/addon-resizer-release-1.8.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.108.9