kube-state-metrics

by joaquinito2051

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

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

ParameterDescriptionDefault
image.repositoryThe image repository to pull fromquay.io/coreos/kube-state-metrics
image.tagThe image tag to pull fromv1.6.0
image.pullPolicyImage pull policyIfNotPresent
replicasNumber of replicas1
service.portThe port of the container8080
hostNetworkWhether or not to use the host networkfalse
prometheusScrapeWhether or not enable prom scrapetrue
rbac.createIf true, create & use RBAC resourcestrue
serviceAccount.createIf true, create & use serviceAccounttrue
serviceAccount.nameIf not set & create is true, use template fullname
serviceAccount.imagePullSecretsSpecify image pull secrets field[]
podSecurityPolicy.enabledIf true, create & use PodSecurityPolicy resourcesfalse
podSecurityPolicy.annotationsSpecify pod annotations in the pod security policy{}
securityContext.enabledEnable security contexttrue
securityContext.fsGroupGroup ID for the container65534
securityContext.runAsUserUser ID for the container65534
priorityClassNameName of Priority Class to assign podsnil
nodeSelectorNode labels for pod assignment{}
affinityAffinity settings for pod assignment{}
tolerationsTolerations for pod assignment[]
podAnnotationsAnnotations to be added to the pod{}
resourceskube-state-metrics resource requests and limits{}
collectors.certificatesigningrequestsEnable the certificatesigningrequests collector.true
collectors.configmapsEnable the configmaps collector.true
collectors.cronjobsEnable the cronjobs collector.true
collectors.daemonsetsEnable the daemonsets collector.true
collectors.deploymentsEnable the deployments collector.true
collectors.endpointsEnable the endpoints collector.true
collectors.horizontalpodautoscalersEnable the horizontalpodautoscalers collector.true
collectors.ingressesEnable the ingresses collector.true
collectors.jobsEnable the jobs collector.true
collectors.limitrangesEnable the limitranges collector.true
collectors.namespacesEnable the namespaces collector.true
collectors.nodesEnable the nodes collector.true
collectors.persistentvolumeclaimsEnable the persistentvolumeclaims collector.true
collectors.persistentvolumesEnable the persistentvolumes collector.true
collectors.poddisruptionbudgetsEnable the poddisruptionbudgets collector.true
collectors.podsEnable the pods collector.true
collectors.replicasetsEnable the replicasets collector.true
collectors.replicationcontrollersEnable the replicationcontrollers collector.true
collectors.resourcequotasEnable the resourcequotas collector.true
collectors.secretsEnable the secrets collector.true
collectors.servicesEnable the services collector.true
collectors.statefulsetsEnable the statefulsets collector.true
prometheus.monitor.enabledSet this to true to create ServiceMonitor for Prometheus operatorfalse
prometheus.monitor.additionalLabelsAdditional labels that can be used so ServiceMonitor will be discovered by Prometheus{}
prometheus.monitor.namespacenamespace where servicemonitor resource should be createdthe 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkube-state-metrics is pinned at v1.6.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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