kube-state-metrics
Helm chartv1.6.1App 1.6.0
Install kube-state-metrics to generate and expose cluster-level metrics
About this chart
kube-state-metrics Helm Chart
- Installs the kube-state-metrics agent.
Installing the Chart
To install the chart with the release name my-release:
$ helm install <helm-repo>/kube-state-metrics
$ helm install stable/kube-state-metrics
Configuration
| Parameter | Description | Default |
|---|---|---|
image.repository | The image repository to pull from | quay.io/coreos/kube-state-metrics |
image.tag | The image tag to pull from | v1.6.0 |
image.pullPolicy | Image pull policy | IfNotPresent |
replicas | Number of replicas | 1 |
service.port | The port of the container | 8080 |
hostNetwork | Whether or not to use the host network | false |
prometheusScrape | Whether or not enable prom scrape | true |
rbac.create | If true, create & use RBAC resources | true |
serviceAccount.create | If true, create & use serviceAccount | true |
serviceAccount.name | If not set & create is true, use template fullname | |
serviceAccount.imagePullSecrets | Specify image pull secrets field | [] |
podSecurityPolicy.enabled | If true, create & use PodSecurityPolicy resources | false |
podSecurityPolicy.annotations | Specify pod annotations in the pod security policy | {} |
securityContext.enabled | Enable security context | true |
securityContext.fsGroup | Group ID for the container | 65534 |
securityContext.runAsUser | User ID for the container | 65534 |
priorityClassName | Name of Priority Class to assign pods | nil |
nodeSelector | Node labels for pod assignment | {} |
affinity | Affinity settings for pod assignment | {} |
tolerations | Tolerations for pod assignment | [] |
podAnnotations | Annotations to be added to the pod | {} |
resources | kube-state-metrics resource requests and limits | {} |
collectors.certificatesigningrequests | Enable the certificatesigningrequests collector. | true |
collectors.configmaps | Enable the configmaps collector. | true |
collectors.cronjobs | Enable the cronjobs collector. | true |
collectors.daemonsets | Enable the daemonsets collector. | true |
collectors.deployments | Enable the deployments collector. | true |
collectors.endpoints | Enable the endpoints collector. | true |
collectors.horizontalpodautoscalers | Enable the horizontalpodautoscalers collector. | true |
collectors.ingresses | Enable the ingresses collector. | true |
collectors.jobs | Enable the jobs collector. | true |
collectors.limitranges | Enable the limitranges collector. | true |
collectors.namespaces | Enable the namespaces collector. | true |
collectors.nodes | Enable the nodes collector. | true |
collectors.persistentvolumeclaims | Enable the persistentvolumeclaims collector. | true |
collectors.persistentvolumes | Enable the persistentvolumes collector. | true |
collectors.poddisruptionbudgets | Enable the poddisruptionbudgets collector. | true |
collectors.pods | Enable the pods collector. | true |
collectors.replicasets | Enable the replicasets collector. | true |
collectors.replicationcontrollers | Enable the replicationcontrollers collector. | true |
collectors.resourcequotas | Enable the resourcequotas collector. | true |
collectors.secrets | Enable the secrets collector. | true |
collectors.services | Enable the services collector. | true |
collectors.statefulsets | Enable the statefulsets collector. | true |
prometheus.monitor.enabled | Set this to true to create ServiceMonitor for Prometheus operator | false |
prometheus.monitor.additionalLabels | Additional labels that can be used so ServiceMonitor will be discovered by Prometheus | {} |
prometheus.monitor.namespace | namespace where servicemonitor resource should be created | the same namespace as kube-state-metrics |
Deploy kube-state-metrics with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kube-state-metrics on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartkube-state-metrics is pinned at v1.6.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply