Running the installation steps, https://github.com/GoogleCloudPlatform/click-to-deploy/tree/master/k8s/influxdb, has stopped working properly, this was working fine last week. The Influxdb manifest is created, but when deployed via kubectl apply -f
the influxdb admin account is not being created and I can't access it via chronograf even though being declared, see below for the manifest.
I can't see anything wrong in this manifest and why the admin accounts aren't being created any more.
---
# Source: influxdb/templates/influxdb-secrets.yaml
apiVersion: v1
kind: Secret
metadata:
name: influxdb-1-influxdb-secret
labels:
app.kubernetes.io/name: influxdb-1
app.kubernetes.io/component: influxdb-server
stringData:
influxdb-admin: root
data:
influxdb-pass: cm9vdAo=
---
# Source: influxdb/templates/manifests.yaml
apiVersion: apps/v1beta2
kind: StatefulSet
metadata:
labels: &InfluxDBDeploymentLabels
app.kubernetes.io/name: influxdb-1
app.kubernetes.io/component: influxdb-server
name: influxdb-1-influxdb
spec:
replicas: 1
selector:
matchLabels: *InfluxDBDeploymentLabels
serviceName: influxdb-1-influxdb-svc
updateStrategy:
type: RollingUpdate
template:
metadata:
labels: *InfluxDBDeploymentLabels
spec:
terminationGracePeriodSeconds: 180
containers:
- name: influxdb
image: marketplace.gcr.io/google/influxdb:1.7
imagePullPolicy: Always
args: ["influxd"]
env:
- name: INFLUXDB_HTTP_AUTH_ENABLED
value: 'true'
- name: INFLUXDB_ADMIN_ENABLED
value: 'true'
- name: INFLUXDB_ADMIN_USER
valueFrom:
secretKeyRef:
name: influxdb-1-influxdb-secret
key: influxdb-admin
- name: INFLUXDB_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: influxdb-1-influxdb-secret
key: influxdb-pass
ports:
- name: influxdb
containerPort: 8086
protocol: TCP
- name: influx-admin
containerPort: 8088
protocol: TCP
- name: influx-graphite
containerPort: 2003
protocol: TCP
livenessProbe:
tcpSocket:
port: influxdb
initialDelaySeconds: 10
timeoutSeconds: 5
readinessProbe:
tcpSocket:
port: influxdb
initialDelaySeconds: 5
timeoutSeconds: 2
volumeMounts:
- name: influxdb-1-data-pvc
mountPath: /var/lib/influxdb
volumeClaimTemplates:
- metadata:
name: influxdb-1-data-pvc
labels: *InfluxDBDeploymentLabels
spec:
resources:
requests:
storage: 1Gi
accessModes:
- ReadWriteOnce
storageClassName: standard
---
apiVersion: v1
kind: Service
metadata:
name: influxdb-1-influxdb-svc
labels:
app.kubernetes.io/name: influxdb-1
app.kubernetes.io/component: influxdb-server
spec:
ports:
- name: influxdb
port: 8086
protocol: TCP
selector:
app.kubernetes.io/name: influxdb-1
app.kubernetes.io/component: influxdb-server
type: ClusterIP # LoadBalancer
---
--update--- When deploying using the click-and-deploy market place I see this in the logs:
ts=2019-06-11T20:07:19.520107Z lvl=info msg=“Sending usage statistics to usage.influxdata.com” log_id=0Fz2HIT0000
[httpd] 127.0.0.1 - - [11/Jun/2019:20:07:21 +0000] “GET /ping HTTP/1.1" 204 0 “-” “InfluxDBShell/1.7.6" 854b0e3f-8c84-11e9-8001-125c1c06721c 285
ts=2019-06-11T20:07:21.138286Z lvl=info msg=“Executing query” log_id=0Fz2HIT0000 service=query query=“CREATE USER \“influxdb-admin\” WITH PASSWORD [REDACTED] WITH ALL PRIVILEGES”
[httpd] 127.0.0.1 - - [11/Jun/2019:20:07:21 +0000] “POST /query?chunked=true&db=&epoch=ns&q=CREATE+USER+%22influxdb-admin%22+WITH+PASSWORD+%5BREDACTED%5D+WITH+ALL+PRIVILEGES HTTP/1.1” 200 57 “-” “InfluxDBShell/1.7.6” 854b3017-8c84-11e9-8002-125c1c06721c 99892
/init-influxdb.sh: ignoring /docker-entrypoint-initdb.d/*
however when installing via command line
ts=2019-06-11T20:12:12.679786Z lvl=info msg=“Sending usage statistics to usage.influxdata.com” log_id=0Fz2ZBbW000
[httpd] 127.0.0.1 - - [11/Jun/2019:20:12:14 +0000] “GET /ping HTTP/1.1" 204 0 “-” “InfluxDBShell/1.7.6" 34205cf1-8c85-11e9-8001-b62630ac388d 166
[httpd] 127.0.0.1 - - [11/Jun/2019:20:12:14 +0000] “POST /query?chunked=true&db=&epoch=ns&q=CREATE+USER+%22influxdb-admin%22+WITH+PASSWORD+%5BREDACTED%5D HTTP/1.1” 400 84 “-” “InfluxDBShell/1.7.6” 34207e7c-8c85-11e9-8002-b62630ac388d 240
influxdb init process in progress...
[httpd] 127.0.0.1 - - [11/Jun/2019:20:12:16 +0000] “GET /ping HTTP/1.1" 204 0 “-” “InfluxDBShell/1.7.6" 353c13de-8c85-11e9-8003-b62630ac388d 46
[httpd] 127.0.0.1 - - [11/Jun/2019:20:12:16 +0000] “POST /query?chunked=true&db=&epoch=ns&q=CREATE+USER+%22influxdb-admin%22+WITH+PASSWORD+%5BREDACTED%5D HTTP/1.1” 400 84 “-” “InfluxDBShell/1.7.6” 353c25f0-8c85-11e9-8004-b62630ac388d 256
It can be seen that the queries generated are different
Answer and description given here https://github.com/GoogleCloudPlatform/click-to-deploy/issues/588