kube-state-metrics

by joaquinito2051

Helm chartv3.2.4App 2.6.0

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 packaged by Bitnami

kube-state-metrics is a simple service that listens to the Kubernetes API server and generates metrics about the state of the objects.

Overview of Kube State Metrics

Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.

Azure-ready Charts with Containers from marketplace.azurecr.io

This Helm Chart has been configured to pull the Container Images from the Azure Marketplace Public Repository. The following command allows you to download and install all the charts from this repository.

$ helm repo add bitnami-azure https://marketplace.azurecr.io/helm/v1/repo

TL;DR

$ helm repo add my-repo https://charts.bitnami.com/bitnami
$ helm install my-release my-repo/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.19+
  • Helm 3.2.0+

Installing the Chart

Add the bitnami charts repo to Helm:

$ helm repo add my-repo https://charts.bitnami.com/bitnami

To install the chart with the release name my-release:

$ helm install my-release my-repo/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

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]
global.storageClassGlobal StorageClass for Persistent Volume(s)""

Common parameters

NameDescriptionValue
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)""
nameOverrideString to partially override kube-state-metrics.name template with a string (will prepend the release name)""
fullnameOverrideString to fully override kube-state-metrics.fullname template with a string""
namespaceOverrideString to fully override common.names.namespace""
commonLabelsAdd labels to all the deployed resources{}
commonAnnotationsAdd annotations to all the deployed resources{}
extraDeployArray of extra objects to deploy with the release[]
diagnosticMode.enabledEnable diagnostic mode (all probes will be disabled and the command will be overridden)false
diagnosticMode.commandCommand to override all containers in the the deployment(s)/statefulset(s)["sleep"]
diagnosticMode.argsArgs to override all containers in the the deployment(s)/statefulset(s)["infinity"]

kube-state-metrics parameters

NameDescriptionValue
hostAliasesAdd deployment host aliases[]
rbac.createWhether to create & use RBAC resources or nottrue
rbac.pspEnabledWhether to create a PodSecurityPolicy and bound it with RBAC. WARNING: PodSecurityPolicy is deprecated in Kubernetes v1.21 or later, unavailable in v1.25 or latertrue
serviceAccount.createSpecifies whether a ServiceAccount should be createdtrue
serviceAccount.nameName of the service account to use. If not set and create is true, a name is generated using the fullname template.""
serviceAccount.automountServiceAccountTokenAutomount service account token for the server service accounttrue
serviceAccount.annotationsAnnotations for service account. Evaluated as a template. Only used if create is true.{}
image.registrykube-state-metrics image registrydocker.io
image.repositorykube-state-metrics image repositorybitnami/kube-state-metrics
image.tagkube-state-metrics image tag (immutable tags are recommended)2.5.0-debian-11-r23
image.digestkube-state-metrics image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
image.pullPolicykube-state-metrics image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[]
extraArgsAdditional command line arguments to pass to kube-state-metrics{}
commandOverride default container command (useful when using custom images)[]
argsOverride default container args (useful when using custom images)[]
lifecycleHooksfor the kube-state-metrics container(s) to automate configuration before or after startup{}
extraEnvVarsArray with extra environment variables to add to kube-state-metrics nodes[]
extraEnvVarsCMName of existing ConfigMap containing extra env vars for kube-state-metrics pod(s)""
extraEnvVarsSecretName of existing Secret containing extra env vars for kube-state-metrics pod(s)""
extraVolumesOptionally specify extra list of additional volumes for the kube-state-metrics pod(s)[]
extraVolumeMountsOptionally specify extra list of additional volumeMounts for the kube-state-metrics container(s)[]
sidecarsAdd additional sidecar containers to the kube-state-metrics pod(s)[]
initContainersAdd additional init containers to the kube-state-metrics pod(s)[]
namespacesComma-separated list of namespaces to be enabled. Defaults to all namespaces. Evaluated as a template.""
kubeResources.certificatesigningrequestsEnable the certificatesigningrequests resourcetrue
kubeResources.configmapsEnable the configmaps resourcetrue
kubeResources.cronjobsEnable the cronjobs resourcetrue
kubeResources.daemonsetsEnable the daemonsets resourcetrue
kubeResources.deploymentsEnable the deployments resourcetrue
kubeResources.endpointsEnable the endpoints resourcetrue
kubeResources.horizontalpodautoscalersEnable the horizontalpodautoscalers resourcetrue
kubeResources.ingressesEnable the ingresses resourcetrue
kubeResources.jobsEnable the jobs resourcetrue
kubeResources.limitrangesEnable the limitranges resourcetrue
kubeResources.mutatingwebhookconfigurationsEnable the mutatingwebhookconfigurations resourcetrue

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 v3.2.4 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