kube-prometheus

by joaquinito2051

Helm chartv8.1.10App 0.60.0

Prometheus Operator provides easy monitoring definitions for Kubernetes services and deployment and management of Prometheus instances.

About this chart

Prometheus Operator packaged by Bitnami

Prometheus Operator provides easy monitoring definitions for Kubernetes services and deployment and management of Prometheus instances.

Overview of Prometheus Operator

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-prometheus

Introduction

This chart bootstraps Prometheus Operator on Kubernetes using the Helm package manager.

In the default configuration the chart deploys the following components on the Kubernetes cluster:

IMPORTANT

Only one instance of the Prometheus Operator component should be running in the cluster. If you wish to deploy this chart to manage multiple instances of Prometheus in your Kubernetes cluster, you have to disable the installation of the Prometheus Operator component using the operator.enabled=false chart installation argument.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.

Prerequisites

  • Kubernetes 1.16+
  • 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-prometheus

The command deploys kube-prometheus on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

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. Use the flag --purge to delete all history too.

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-prometheus.name template with a string (will prepend the release name)""
fullnameOverrideString to fully override kube-prometheus.fullname template with a string""
namespaceOverrideString to fully override common.names.namespace""
commonAnnotationsAnnotations to add to all deployed objects{}
commonLabelsLabels to add to all deployed objects{}
extraDeployArray of extra objects to deploy with the release[]
clusterDomainKubernetes cluster domain namecluster.local

Prometheus Operator Parameters

NameDescriptionValue
operator.enabledDeploy Prometheus Operator to the clustertrue
operator.image.registryPrometheus Operator image registrydocker.io
operator.image.repositoryPrometheus Operator image repositorybitnami/prometheus-operator
operator.image.tagPrometheus Operator image tag (immutable tags are recommended)0.58.0-debian-11-r8
operator.image.digestPrometheus Operator image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag""
operator.image.pullPolicyPrometheus Operator image pull policyIfNotPresent
operator.image.pullSecretsSpecify docker-registry secret names as an array[]
operator.extraArgsAdditional arguments passed to Prometheus Operator[]
operator.commandOverride default container command (useful when using custom images)[]
operator.argsOverride default container args (useful when using custom images)[]
operator.lifecycleHooksfor the Prometheus Operator container(s) to automate configuration before or after startup{}
operator.extraEnvVarsArray with extra environment variables to add to Prometheus Operator nodes[]
operator.extraEnvVarsCMName of existing ConfigMap containing extra env vars for Prometheus Operator nodes""
operator.extraEnvVarsSecretName of existing Secret containing extra env vars for Prometheus Operator nodes""
operator.extraVolumesOptionally specify extra list of additional volumes for the Prometheus Operator pod(s)[]
operator.extraVolumeMountsOptionally specify extra list of additional volumeMounts for the Prometheus Operator container(s)[]
operator.sidecarsAdd additional sidecar containers to the Prometheus Operator pod(s)[]
operator.initContainersAdd additional init containers to the Prometheus Operator pod(s)[]
operator.hostAliasesAdd deployment host aliases[]
operator.serviceAccount.createSpecify whether to create a ServiceAccount for Prometheus Operatortrue
operator.serviceAccount.nameThe name of the ServiceAccount to create""
operator.serviceAccount.automountServiceAccountTokenAutomount service account token for the server service accounttrue
operator.serviceAccount.annotationsAnnotations for service account. Evaluated as a template. Only used if create is true.{}
operator.schedulerNameName of the Kubernetess scheduler (other than default)""
operator.terminationGracePeriodSecondsIn seconds, time the given to the Prometheus Operator pod needs to terminate gracefully""
operator.topologySpreadConstraintsTopology Spread Constraints for pod assignment[]
operator.podSecurityContext.enabledEnable pod security contexttrue
operator.podSecurityContext.runAsUserUser ID for the container1001
operator.podSecurityContext.fsGroupGroup ID for the container filesystem1001
operator.containerSecurityContext.enabledEnable container security contexttrue
operator.containerSecurityContext.capabilities.dropLinux Kernel capabilities which should be dropped[]
operator.containerSecurityContext.runAsNonRootForce the container to run as a non root usertrue
operator.containerSecurityContext.allowPrivilegeEscalationSwitch privilegeEscalation possibility on or offfalse
operator.containerSecurityContext.readOnlyRootFilesystemMount / (root) as a readonly filesystemfalse
operator.service.typeKubernetes service typeClusterIP
operator.service.ports.http

Deploy kube-prometheus with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kube-prometheus 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-prometheus is pinned at v8.1.10 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