influxdb
by Helm
Scalable datastore for metrics, events, and real-time analytics.
About this chart
InfluxDB Helm chart
InfluxDB is an open source time series database with no external dependencies. It's useful for recording metrics, events, and performing analytics.
The InfluxDB Helm chart uses the Helm package manager to bootstrap an InfluxDB StatefulSet and service on a Kubernetes cluster.
Note: ### If you're using the InfluxDB Enterprise Helm chart, check out InfluxDB Enterprise Helm chart.
Prerequisites
- Helm v2 or later
- Kubernetes 1.4+
- (Optional) PersistentVolume (PV) provisioner support in the underlying infrastructure
Install the chart
-
Add the InfluxData Helm repository:
helm repo add influxdata https://helm.influxdata.com/ -
Run the following command, providing a name for your release:
helm upgrade --install my-release influxdata/influxdbTip:
--installcan be shortened to-i.This command deploys InfluxDB on the Kubernetes cluster using the default configuration. To find parameters you can configure during installation, see Configure the chart.
Tip: To view all Helm chart releases, run
helm list.
Uninstall the chart
To uninstall the my-release deployment, use the following command:
helm uninstall my-release
This command removes all the Kubernetes components associated with the chart and deletes the release.
Configure the chart
The following table lists configurable parameters, their descriptions, and their default values stored in values.yaml.
| Parameter | Description | Default |
|---|---|---|
| image.repository | Image repository url | influxdb |
| image.tag | Image tag | 1.8.0-alpine |
| image.pullPolicy | Image pull policy | IfNotPresent |
| image.pullSecrets | It will store the repository's credentials to pull image | nil |
| serviceAccount.create | It will create service account | true |
| serviceAccount.name | Service account name | "" |
| serviceAccount.annotations | Service account annotations | {} |
| livenessProbe | Health check for pod | {} |
| readinessProbe | Health check for pod | {} |
| startupProbe | Health check for pod | {} |
| service.type | Kubernetes service type | ClusterIP |
| service.loadBalancerIP | A user-specified IP address for service type LoadBalancer to use as External IP (if supported) | nil |
| service.externalIPs | A user-specified list of externalIPs to add to the service | nil |
| service.externalTrafficPolicy | A user specified external traffic policy | nil |
| service.nodePorts.http | Node port to expose for HTTP API if service.type=NodePort or service.type=LoadBalancer | Random port from range 30000-32767 |
| persistence.enabled | Boolean to enable and disable persistance | true |
| persistence.existingClaim | An existing PersistentVolumeClaim, ignored if enterprise.enabled=true | nil |
| persistence.storageClass | If set to "-", storageClassName: "", which disables dynamic provisioning. If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. (gp2 on AWS, standard on GKE, AWS & OpenStack | |
| persistence.annotations | Annotations for volumeClaimTemplates | nil |
| persistence.accessMode | Access mode for the volume | ReadWriteOnce |
| persistence.size | Storage size | 8Gi |
| podAnnotations | Annotations for pod | {} |
| podLabels | Labels for pod | {} |
| ingress.enabled | Boolean flag to enable or disable ingress | false |
| ingress.tls | Boolean to enable or disable tls for ingress. If enabled provide a secret in ingress.secretName containing TLS private key and certificate. | false |
| ingress.secretName | Kubernetes secret containing TLS private key and certificate. It is only required if ingress.tls is enabled. | nil |
| ingress.hostname | Hostname for the ingress | "" |
| ingress.annotations | ingress annotations | nil |
| schedulerName | Use an alternate scheduler, e.g. "stork". | nil |
| nodeSelector | Node labels for pod assignment | {} |
| affinity | Affinity for pod assignment | { |
| tolerations | Tolerations for pod assignment | [] |
| securityContext | securityContext for pod | {} |
| env | environment variables for influxdb container | {} |
| volumes | volumes stanza(s) to be used in the main container | nil |
| mountPoints | volumeMount stanza(s) to be used in the main container | nil |
| extraContainers | Additional containers to be added to the pod | {} |
| config.reporting_disabled | Details | false |
| config.rpc | RPC address for backup and storage | bind-address: ":8088" |
| config.meta | Details | {} |
| config.data | Details | {} |
| config.coordinator | Details | {} |
| config.retention | Details | {} |
| config.shard_precreation | Details | {} |
| config.monitor | Details | {} |
| config.http | Details | enabled: truebind-address: ":8086"flux-enabled: true |
| config.logging | Details | {} |
| config.subscriber | Details | {} |
| config.graphite | Details | {} |
| config.collectd | Details | {} |
| config.opentsdb | Details | {} |
| config.udp | Details | {} |
| config.continous_queries | Details | {} |
| config.tls | Details | {} |
| initScripts.enabled | Boolean flag to enable and disable initscripts. If the container finds any files with the extensions .sh or .iql inside of the /docker-entrypoint-initdb.d folder, it will execute them. The order they are executed in is determined by the shell. This is usually alphabetical order. | false |
| initScripts.scripts | Init scripts | {} |
| backup.enabled | Enable backups, if true must configure one of the storage providers | false |
| backup.gcs | Google Cloud Storage config | nil |
| backup.azure | Azure Blob Storage config | nil |
| backup.s3 | Amazon S3 (or compatible) config | nil |
| backup.schedule | Schedule to run jobs in cron format | 0 0 * * * |
| backup.startingDeadlineSeconds | Deadline in seconds for starting the job if it misses its scheduled time for any reason | nil |
| backup.annotations | Annotations for backup cronjob | {} |
| backup.podAnnotations | Annotations for backup cronjob pods | {} |
| backup.persistence.enabled | Boolean to enable and disable persistance | false |
| backup.persistence.storageClass | If set to "-", storageClassName: "", which disables dynamic provisioning. If undefined (the default) or set to null, no storageClassName spec is set, choosing the default provisioner. (gp2 on AWS, standard on GKE, AWS & OpenStack | |
| backup.persistence.annotations | Annotations for volumeClaimTemplates | {} |
| backup.persistence.accessMode | Access mode for the volume | ReadWriteOnce |
| backup.persistence.size | Storage size | 8Gi |
| backup.resources | Resources requests and limits for backup pods | ephemeral-storage: 8Gi |
To configure the chart, do either of the following:
-
Specify each parameter using the
--set key=value[,key=value]argument tohelm upgrade --install. For example:helm upgrade --install my-release \ --set persistence.enabled=true,persistence.size=200Gi \ influxdata/influxdbThis command enables persistence and changes the size of the requested data volume to 200GB.
-
Provide a YAML file that specifies the parameter values while installing the chart. For example, use the following command:
helm upgrade --install my-release -f values.yaml influxdata/influxdbTip: Use the default values.yaml.
For information about running InfluxDB in Docker, see the full image documentation.
Persistence
The InfluxDB image stores data in the /var/lib/influxdb directory in the container.
If persistence is enabled, a Persistent Volume associated with StatefulSet is provisioned. The volume is created using dynamic volume provisioning. In case of a disruption (for example,
Deploy influxdb with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has influxdb 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartinfluxdb is pinned at v4.12.5 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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