bitnamicharts/influxdb
Bitnami Helm chart for InfluxDB(TM)
100K+
InfluxDB(TM) is an open source time-series database. It is a core component of the TICK (Telegraf, InfluxDB(TM), Chronograf, Kapacitor) stack.
InfluxDB(TM) is a trademark owned by InfluxData, which is not affiliated with, and does not endorse, this site.
helm install my-release oci://registry-1.docker.io/bitnamicharts/influxdb
Looking to use InfluxDB™ in production? Try VMware Tanzu Application Catalog, the commercial edition of the Bitnami catalog.
This chart bootstraps a influxdb deployment on a Kubernetes cluster using the Helm package manager.
Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters.
To install the chart with the release name my-release
:
helm install my-release oci://REGISTRY_NAME/REPOSITORY_NAME/influxdb
Note: You need to substitute the placeholders
REGISTRY_NAME
andREPOSITORY_NAME
with a reference to your Helm chart registry and repository. For example, in the case of Bitnami, you need to useREGISTRY_NAME=registry-1.docker.io
andREPOSITORY_NAME=bitnamicharts
.
These commands deploy influxdb on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Bitnami charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the resources
value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.
To make this process easier, the chart contains the resourcesPreset
values, which automatically sets the resources
section according to different presets. Check these presets in the bitnami/common chart. However, in production workloads using resourcesPreset
is discouraged as it may not fully adapt to your specific needs. Find more information on container resource management in the official Kubernetes documentation.
Bitnami charts configure credentials at first boot. Any further change in the secrets or credentials require manual intervention. Follow these instructions:
kubectl create secret generic SECRET_NAME --from-literal=admin-user-password=PASSWORD --from-literal=admin-user-token=ADMIN_USER_TOKEN --dry-run -o yaml | kubectl apply -f -
This chart can be integrated with Prometheus by setting metrics.enabled
to true
. This will expose the InfluxDB native Prometheus endpoint. Additionally, it will deploy a metrics
service, which can be configured under the metrics.service
section. This metrics
service will have the necessary annotations to be automatically scraped by Prometheus.
Prometheus requirements
It is necessary to have a working installation of Prometheus or Prometheus Operator for the integration to work. Install the Bitnami Prometheus helm chart or the Bitnami Kube Prometheus helm chart to easily have a working Prometheus in your cluster.
Integration with Prometheus Operator
The chart can deploy ServiceMonitor
objects for integration with Prometheus Operator installations. To do so, set the value metrics.serviceMonitor.enabled=true
. Ensure that the Prometheus Operator CustomResourceDefinitions
are installed in the cluster or it will fail with the following error:
no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
Install the Bitnami Kube Prometheus helm chart for having the necessary CRDs and the Prometheus Operator.
It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.
Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.
This chart installs a deployment with the following configuration:
------------------
| Ingress |
| Controller |
------------------
|
| /query
| /write
\/
----------------
| InfluxDB(TM) |
| svc |
----------------
|
\/
--------------
| InfluxDB(TM) |
| Server |
| Pod |
--------------
ingress.enabled=true
to expose InfluxDB™ through Ingress.influxdb.service.type=ClusterIP
to choose this service type.NodeIP:NodePort
. Set influxdb.service.type=NodePort
to choose this service type.influxdb.service.type=LoadBalancer
to choose this service type.This helm chart supports to customize the whole configuration file.
Add your custom configuration file to "files/conf" in your working directory. This file will be mounted as a configMap to the containers and it will be used for configuring InfluxDB™.
Alternatively, you can specify the InfluxDB™ configuration using the influxdb.configuration
parameter.
In addition to these options, you can also set an external ConfigMap with all the configuration files. This is done by setting the influxdb.existingConfiguration
parameter. Note that this will override the two previous options.
In case you want to add extra environment variables, you can use the influxdb.extraEnvVars
property.
extraEnvVars:
- name: INFLUXDB_DATA_QUERY_LOG_ENABLED
value: "true"
The Bitnami InfluxDB™ image allows you to use your custom scripts to initialize a fresh instance. In order to execute the scripts, they must be located inside the chart folder files/docker-entrypoint-initdb.d
so they can be consumed as a ConfigMap.
Alternatively, you can specify custom scripts using the influxdb.initdbScripts
parameter.
In addition to these options, you can also set an external ConfigMap with all the initialization scripts. This is done by setting the influxdb.initdbScriptsCM
parameter. Note that this will override the two previous options. parameter.
The allowed extensions are .sh
, and .txt
.
The Bitnami InfluxDB™ image allows you to migrate your InfluxDB 1.x data into 2.x format by setting the INFLUXDB_INIT_MODE=upgrade
environment variable, and mounting the InfluxDB 1.x data into the container (let the initialization logic know where it is located with the INFLUXDB_INIT_V1_DIR
variable). Do not point INFLUXDB_INIT_V1_DIR
into INFLUXDB_VOLUME_DIR
(default: /bitnami/influxdb
), or the upgrade process will fail.
This chart allows you to set your custom affinity using the XXX.affinity
parameter(s). Find more information about Pod's affinity in the kubernetes documentation.
As an alternative, you can use of the preset configurations for pod affinity, pod anti-affinity, and node affinity available at the bitnami/common chart. To do so, set the XXX.podAffinityPreset
, XXX.podAntiAffinityPreset
, or XXX.nodeAffinityPreset
parameters.
To back up and restore Helm chart deployments on Kubernetes, you need to back up the persistent volumes from the source deployment and attach them to a new deployment using Velero, a Kubernetes backup/restore tool. Find the instructions for using Velero in this guide.
The data is persisted by default using PVC(s). You can disable the persistence setting the persistence.enabled
parameter to false
.
A default StorageClass
is needed in the Kubernetes cluster to dynamically provision the volumes. Specify another StorageClass in the persistence.storageClass
or set persistence.existingClaim
if you have already existing persistent volumes to use.
If you would like to define persistence settings for a backup volume that differ from the persistence settings for the database volume, you may do so under the backup.persistence
section of the configuration by setting backup.persistence.ownConfig
to true
. The backup volume will otherwise be defined using the persistence
parameter section.
As the images run as non-root by default, it is necessary to adjust the ownership of the persistent volumes so that the containers can write data into it.
By default, the chart is configured to use Kubernetes Security Context to automatically change the ownership of the volume. However, this feature does not work in all Kubernetes distributions. As an alternative, this chart supports using an initContainer to change the ownership of the volume before mounting it in the final destination.
You can enable this initContainer by setting volumePermissions.enabled
to true
.
There are K8s distribution, such as OpenShift, where you can dynamically define the UID to run this initContainer. To do so, set the volumePermissions.securityContext.runAsUser
to auto
.
Name | Description | Value |
---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
global.defaultStorageClass | Global default StorageClass for Persistent Volume(s) | "" |
global.storageClass | DEPRECATED: use global.defaultStorageClass instead | "" |
global.security.allowInsecureImages | Allows skipping image verification | false |
global.compatibility.openshift.adaptSecurityContext | Adapt the securityContext sections of the deployment to make them compatible with Openshift restricted-v2 SCC: remove runAsUser, runAsGroup and fsGroup and let the platform use their allowed default IDs. Possible values: auto (apply if the detected running cluster is Openshift), force (perform the adaptation always), disabled (do not perform adaptation) | auto |
Name | Description | Value |
---|---|---|
kubeVersion | Force target Kubernetes version (using Helm capabilities if not set) | "" |
nameOverride | String to partially override influxdb.fullname template with a string (will prepend the release name) | "" |
fullnameOverride | String to fully override influxdb.fullname template with a string | "" |
clusterDomain | Default Kubernetes cluster domain | cluster.local |
commonAnnotations | Annotations to add to all deployed objects | {} |
commonLabels | Labels to add to all deployed objects | {} |
extraDeploy | Array of extra objects to deploy with the release | [] |
diagnosticMode.enabled | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | false |
diagnosticMode.command | Command to override all containers in the deployment | ["sleep"] |
diagnosticMode.args | Args to override all containers in the deployment | ["infinity"] |
Name | Description | Value |
---|---|---|
image.registry | InfluxDB™ image registry | REGISTRY_NAME |
image.repository | InfluxDB™ image repository | REPOSITORY_NAME/influxdb |
image.digest | InfluxDB™ image digest in the way sha256:aa.... Please note this parameter, if set, will override the tag | "" |
image.pullPolicy | InfluxDB™ image pull policy | IfNotPresent |
image.pullSecrets | Specify docker-registry secret names as an array | [] |
image.debug | Specify if debug logs should be enabled | false |
auth.enabled | Enable/disable authentication (Variable to keep compatibility with InfluxDB™ v1, in v2 it will be ignored) | true |
auth.usePasswordFiles | Whether to use files to provide secrets instead of env vars. | false |
auth.admin.username | InfluxDB™ admin user name | admin |
auth.admin.password | InfluxDB™ admin user's password | "" |
auth.admin.token | InfluxDB™ admin user's token. Only valid with InfluxDB™ v2 | "" |
auth.admin.org | InfluxDB™ admin user's org. Only valid with InfluxDB™ v2 | primary |
auth.admin.bucket | InfluxDB™ admin user's bucket. Only valid with InfluxDB™ v2 | primary |
auth.admin.retention | InfluxDB™ admin user's bucket retention. Only valid with InfluxDB™ v2 | "" |
auth.createUserToken | Whether to create tokens for the different users. Take into account these tokens are going to be created by CLI randomly and they will not be accessible from a secret. See more influxdb 2.0 auth ref | false |
auth.user.username | Name for InfluxDB™ user with 'admin' privileges on the bucket specified at auth.user.bucket and auth.user.org or auth.admin.org | "" |
auth.user.password | InfluxDB™ password for user.name user | "" |
auth.user.org | Org to be created on first run | "" |
auth.user.bucket | Bucket to be created on first run | "" |
auth.readUser.username | Name for InfluxDB™ user with 'read' privileges on the bucket spe |
Note: the README for this chart is longer than the DockerHub length limit of 25000, so it has been trimmed. The full README can be found at https://github.com/bitnami/charts/blob/main/bitnami/influxdb/README.md