f6eb996f7cf837d51cca40c028433df3efd70466
[ric-plt/ric-dep.git] / helm / 3rdparty / influxdb / README.md
1 # InfluxDB v2 Helm chart
2
3 [InfluxDB](https://github.com/influxdata/influxdb) is an open source time series
4 database with no external dependencies. It's useful for recording metrics,
5 events, and performing analytics.
6
7 The InfluxDB v2 Helm chart uses the [Helm](https://helm.sh) package manager to
8 bootstrap an InfluxDB v2 StatefulSet and service on a
9 [Kubernetes](http://kubernetes.io) cluster.
10
11 ## Prerequisites
12
13 - Helm v3 or later
14 - Kubernetes 1.4+
15 - (Optional) PersistentVolume (PV) provisioner support in the underlying infrastructure
16
17 ## Install the chart
18
19 1. Add the InfluxData Helm repository:
20
21    ```bash
22    helm repo add influxdata https://helm.influxdata.com/
23    ```
24
25 2. Run the following command, providing a name for your InfluxDB release:
26
27    ```bash
28    helm upgrade --install my-release influxdata/influxdb2
29    ```
30
31    > **Tip**: `--install` can be shortened to `-i`.
32
33    This command deploys InfluxDB v2 on the Kubernetes cluster using the default configuration.
34
35   > **Tip**: To view all Helm chart releases, run `helm list`.
36
37 ## Uninstall the chart
38
39 To uninstall the `my-release` deployment, use the following command:
40
41 ```bash
42 helm uninstall my-release
43 ```
44
45 This command removes all Kubernetes components associated with the chart and deletes the release.
46
47 ## Persistence
48
49 The [InfluxDB v2](https://hub.docker.com/_/influxdb/) image stores data in the `/var/lib/influxdb2` directory in the container.
50
51 If persistence is enabled, a [Persistent Volume](http://kubernetes.io/docs/user-guide/persistent-volumes/)
52 associated with StatefulSet is provisioned. The volume is created using dynamic
53 volume provisioning. In case of a disruption (for example, a node drain),
54 Kubernetes ensures that the same volume is reattached to the Pod, preventing any
55 data loss. However, when persistence is **not enabled**, InfluxDB data is stored
56 in an empty directory, so if a Pod restarts, data is lost.
57
58 Check out our [Slack channel](https://www.influxdata.com/slack) for support and information.
59
60 ## Fixed Auth Credentials
61
62 If you need to use fixed token and/or password you can set the values
63 `adminUser.password` and `adminUser.token` or you can use an existing secret,
64 which would be a better approach.
65
66 Example Secret:
67
68 ```yaml
69 apiVersion: v1
70 kind: Secret
71 metadata:
72   name: influxdb-auth
73 type: Opaque
74 data:
75   admin-password: ...
76   admin-token: ...
77 ```
78
79 If you do not specify an existing secret, the admin-password and admin-token
80 will be automatically generated. They will remain consistent even after
81 `helm upgrade`.
82
83 ## Influx setup
84
85 By default this chart uses the docker hub influxdb image which includes an
86 entrypoint for automatically setting up InfluxDB. This operation is idempotent
87 and will be skipped if a boltdb is found on startup.
88
89 For more information see "Automated Setup" in the [docker image README](https://hub.docker.com/_/influxdb).
90
91 For configuration options see `adminUser` in `values.yaml`.
92
93 ## Configuration
94
95 Extra environment variables can be passed influxdb using `.Values.env`. For
96 example:
97
98 ```yaml
99 env:
100   - name: FOO
101     value: BAR
102   - name: BAZ
103     valueFrom:
104       secretKeyRef:
105         name: my-secret
106         key: my-key
107 ```