kube-state-metrics

by joaquinito2051

Helm chartv2.9.1App 1.9.7

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 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.9.7
image.pullPolicyImage pull policyIfNotPresent
imagePullSecretsList of container registry secrets[]
replicasNumber of replicas1
autosharding.enabledSet to true to automatically shard data across replicas pods. EXPERIMENTALfalse
service.portThe port of the container8080
service.annotationsAnnotations to be added to the service{}
customLabelsCustom labels to apply to service, deployment and pods{}
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[]
serviceAccount.annotationsAnnotations to be added to the serviceAccount{}
podSecurityPolicy.enabledIf true, create & use PodSecurityPolicy resources. Note that related RBACs are created only if rbac.enabled is true.false
podSecurityPolicy.annotationsSpecify pod annotations in the pod security policy{}
podSecurityPolicy.additionalVolumesSpecify allowed volumes in the pod security policy (secret is always allowed)[]
securityContext.enabledEnable security contexttrue
securityContext.fsGroupGroup ID for the filesystem65534
securityContext.runAsGroupGroup 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{}
podDisruptionBudgetOptional PodDisruptionBudget{}
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.mutatingwebhookconfigurationsEnable the mutatingwebhookconfigurations collector.true
collectors.namespacesEnable the namespaces collector.true
collectors.networkpoliciesEnable the networkpolicies 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
collectors.storageclassesEnable the storageclasses collector.true
collectors.validatingwebhookconfigurationsEnable the validatingwebhookconfigurations collector.true
collectors.verticalpodautoscalersEnable the verticalpodautoscalers collector.true
collectors.volumeattachmentsEnable the volumeattachments 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
prometheus.monitor.honorLabelsHonor metric labelsfalse
namespaceOverrideOverride the deployment namespace"" (Release.Namespace)
kubeTargetVersionOverrideOverride the k8s version of the target cluster""
kubeconfig.enabledAdds --kubeconfig arg to container at startup""
kubeconfig.secretBase64 encoded kubeconfig file""

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 v2.9.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