Post

[Kubernetes] InfluxDB

[Kubernetes] InfluxDB

Helm 설치 및 설명 참고

Install InfluxDB

1
2
3
helm repo add influxdata https://helm.influxdata.com/
helm repo update
helm install influxdb influxdata/influxdb

InfluxDB - Helm 설치 참고

Customize Default Configuration

  • values.yaml 수정

    최상위 values.yaml을 수정하면 하위 폴더 values.yaml을 override 한다.

    • Chart
      • https://github.com/influxdata/helm-charts/tree/master/charts/influxdb
    • Release file (.tgz)
      • https://github.com/influxdata/helm-charts/releases

InfluxDB 설정 및 사용법 참고

Setting config

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
...
config:
  reporting_disabled: false
  rpc:
    bind-address: ":8088"
  meta: {}
  data: {}
  coordinator: {}
  retention: {}
  shard_precreation: {}
  monitor: {}
  http:
    enabled: true
    bind-address: ":8086"
    flux-enabled: true
  logging: {}
  subscriber: {}
  graphite: {}
  collectd: {}
  opentsdb: {}
  udp: {}
  continuous_queries: {}
  tls: {}
...

Setting create database

1
2
3
4
5
6
7
...
initScripts:
  enabled: false
  scripts:
    init.iql: |+
      CREATE DATABASE "telegraf" WITH DURATION 30d REPLICATION 1 NAME "rp_30d"
...

API Create Database

1
curl -XPOST 'http://[influxdb-svc].[influxdb-namespace].svc:8086/query' --data-urlencode 'q=CREATE DATABASE mydb'

Install Customize Default Configuration

1
helm install [RELEASE NAME] [Chart.yaml 경로] -f [YAML 파일 또는 URL에 값 지정 (여러 개를 지정가능)] -n [NAMESPACE NAME]
1
helm install influxdb influxdata/influxdb -f override-values.yaml -n [NAMESPACE NAME]
This post is licensed under CC BY 4.0 by the author.