Hi there,
I’m facing a non-usual issue with my new InfluxDB 2.0.4 deploy in Kubernetes.
If I perform a scale down to 0 replicas and then a scale up to 1, when I log into InfluxDB it appears the wizard to create the initial settings.
I’ve changed the YAML to have a persistent volume and I can see that the pod is always bound to the same volume.
Also, I’m mounting the disk in /root/.influxdbv2.
It looks like this:
---
apiVersion: v1
kind: Namespace
metadata:
name: influx
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: influxdb-disk-claim
namespace: influx
spec:
accessModes:
- ReadWriteOnce
storageClassName: default
resources:
requests:
storage: 1Ti
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app: influxdb
name: influxdb
namespace: influx
spec:
replicas: 1
selector:
matchLabels:
app: influxdb
serviceName: influxdb
template:
metadata:
labels:
app: influxdb
spec:
volumes:
- name: data
persistentVolumeClaim:
claimName: influxdb-disk-claim
containers:
- image: influxdb:2.0.4
name: influxdb
ports:
- containerPort: 8086
name: influxdb
volumeMounts:
- mountPath: /root/.influxdbv2
name: data
env:
- name: INFLUXD_STORAGE_CACHE_SNAPSHOT_WRITE_COLD_DURATION
value: "5s"
---
apiVersion: v1
kind: Service
metadata:
name: influxdb
namespace: influx
spec:
ports:
- name: influxdb
port: 8086
targetPort: 8086
selector:
app: influxdb
type: LoadBalancer
Can someone explain me what am I missing here?
Thanks