kube-state-metrics
kube-state-metrics is a simple service that listens to the Kubernetes API server and generates metrics about the state of the objects.
About this chart
kube-state-metrics
kube-state-metrics is a simple service that listens to the Kubernetes API server and generates metrics about the state of the objects.
TL;DR
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/kube-state-metrics
Introduction
This chart bootstraps kube-state-metrics on Kubernetes using the Helm package manager.
Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.
Prerequisites
- Kubernetes 1.12+
- Helm 3.0-beta3+
Installing the Chart
Add the bitnami charts repo to Helm:
$ helm repo add bitnami https://charts.bitnami.com/bitnami
To install the chart with the release name my-release:
$ helm install my-release bitnami/kube-state-metrics
The command deploys kube-state-metrics on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.
Uninstalling the Chart
To uninstall/delete the my-release release:
$ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release.
Parameters
The following table lists the configurable parameters of the kube-state-metrics chart and their default values.
| Parameter | Description | Default |
|---|---|---|
global.imageRegistry | Global Docker image registry | nil |
global.imagePullSecrets | Global Docker registry secret names as an array | [] (does not add image pull secrets to deployed pods) |
global.storageClass | Global storage class for dynamic provisioning | nil |
global.labels | Additional labels to apply to all resources | {} |
nameOverride | String to partially override kube-state-metrics.name template with a string (will prepend the release name) | nil |
fullnameOverride | String to fully override kube-state-metrics.fullname template with a string | nil |
rbac.create | Whether to create & use RBAC resources or not | true |
rbac.apiVersion | Version of the RBAC API | v1beta1 |
rbac.pspEnabled | PodSecurityPolicy | true |
serviceAccount.create | Specify whether to create a ServiceAccount for kube-state-metrics | true |
serviceAccount.name | The name of the ServiceAccount to create | Generated using the kube-state-metrics.fullname template |
image.registry | kube-state-metrics image registry | docker.io |
image.repository | kube-state-metrics Image name | bitnami/kube-state-metrics |
image.tag | kube-state-metrics Image tag | {TAG_NAME} |
image.pullPolicy | kube-state-metrics image pull policy | IfNotPresent |
image.pullSecrets | Specify docker-registry secret names as an array | [] (does not add image pull secrets to deployed pods) |
extraArgs | Additional command line arguments to pass to kube-state-metrics | {} |
namespace | Comma-separated list of namespaces to be enabled. Defaults to all namespaces | `` |
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.mutatingwebhookconfigurations | Enable the mutatingwebhookconfigurations collector | true |
collectors.namespaces | Enable the namespaces collector | true |
collectors.networkpolicies | Enable the networkpolicies 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 |
collectors.storageclasses | Enable the storageclasses collector | true |
collectors.verticalpodautoscalers | Enable the verticalpodautoscalers collector | false |
collectors.validatingwebhookconfigurations | Enable the validatingwebhookconfigurations collector | false |
collectors.volumeattachments | Enable the volumeattachments collector | true |
securityContext.enabled | Enable security context | true |
securityContext.runAsUser | User ID for the container | 1001 |
securityContext.fsGroup | Group ID for the container filesystem | 1001 |
service.type | Kubernetes service type | ClusterIP |
service.port | kube-state-metrics service port | 8080 |
service.clusterIP | Specific cluster IP when service type is cluster IP. Use None for headless service | nil |
service.nodePort | Kubernetes Service nodePort | nil |
service.loadBalancerIP | loadBalancerIP if service type is LoadBalancer | nil |
| `service.loadBalance |
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.1.3 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