Influxdb
LogZilla documentation for Influxdb
InfluxDB manifest
yamlapiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: influxdb-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
---
apiVersion: v1
kind: Secret
metadata:
name: influxdb-secret
type: Opaque
stringData:
INFLUXDB_ADMIN_USER: logzilla
INFLUXDB_ADMIN_PASSWORD: <set-strong-password>
INFLUXDB_USER: user
INFLUXDB_USER_PASSWORD: <set-strong-password>
---
apiVersion: v1
kind: ConfigMap
metadata:
name: influxdb-multimap
data:
INFLUXDB_DATA_MAX_VALUES_PER_TAG: "10000"
INFLUXDB_DATA_MAX_SERIES_PER_DATABASE: "0"
INFLUXDB_DATA_INDEX_VERSION: inmem
INFLUXDB_LOGGING_FORMAT: json
INFLUXDB_LOGGING_LEVEL: warn
INFLUXDB_COORDINATOR_LOG_QUERIES_AFTER: 10s
INFLUXDB_HTTP_LOG_ENABLED: "false"
INFLUXDB_HTTP_ACCESS_LOG_PATH: ""
INFLUXDB_UDP_ENABLED: "true"
INFLUXDB_UDP_BIND_ADDRESS: :8086
INFLUXDB_UDP_DATABASE: lzcounters
INFLUXDB_UDP_BATCH_TIMEOUT: 1s
INFLUXDB_UDP_0_BATCH_SIZE: "5000"
INFLUXDB_UDP_BATCH_SIZE: "0"
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: influxdb
spec:
serviceName: influxdb
selector:
matchLabels:
name: influxdb
template:
metadata:
labels:
name: influxdb
spec:
containers:
- name: influxdb
image: library/influxdb:1.8.10-alpine
resources:
requests:
memory: 1Gi
cpu: 500m
limits:
memory: 2Gi
cpu: 1000m
ports:
- containerPort: 8086
name: api
protocol: TCP
- containerPort: 8086
name: udp-counters
protocol: UDP
livenessProbe:
failureThreshold: 3
httpGet:
path: /health
port: api
scheme: HTTP
initialDelaySeconds: 30
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 5
readinessProbe:
failureThreshold: 3
httpGet:
path: /health
port: api
scheme: HTTP
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
envFrom:
- configMapRef:
name: influxdb-multimap
- secretRef:
name: influxdb-secret
volumeMounts:
- name: influxdb
mountPath: /var/lib/influxdb/
readOnly: false
volumes:
- name: influxdb
persistentVolumeClaim:
claimName: influxdb-pvc
---
apiVersion: v1
kind: Service
metadata:
name: influxdb
spec:
ports:
- port: 8086
name: api
targetPort: 8086
protocol: TCP
- port: 8086
name: udp-counters
targetPort: 8086
protocol: UDP
type: ClusterIP
selector:
name: influxdb
Notes
- Replace placeholder values with environment-specific credentials. Examples
use
stringData
for readability. If you preferdata:
, base64-encode values. - Adjust PVC size and StorageClass as needed.