Greg McNamara
Greg McNamara

Reputation: 35

InfluxDB2 on Kubernetes not using existing admin password/token secret

I'm installing InfluxDB2 on a Kubernetes cluster (AWS EKS) and in the helm chart I specify an existing secret name "influxdb-auth" for admin user credentials. When I try to login to the web admin interface, it does not accept the password or token from that secret. If I don't specify an existing secret, it automatically creates a secret "influxdb2-auth" and I can retrieve and use the password successfully, but it will not use the existing secret. Also when I specify the existing secret "influxdb-auth" it does not create a secret "influxdb2-auth" so I can't retrieve the password it has generated. I have tried naming the existing secret "influxdb2-auth" but that also did not work. Any ideas on what the problem might be?

Section from values.yaml:

## Create default user through docker entrypoint
## Defaults indicated below
##
adminUser:
  organization: "test"
  bucket: "default"
  user: "admin"
  retention_policy: "0s"
  ## Leave empty to generate a random password and token.
  ## Or fill any of these values to use fixed values.
  password: ""
  token: ""

  ## The password and token are obtained from an existing secret. The expected
  ## keys are `admin-password` and `admin-token`.
  ## If set, the password and token values above are ignored.
  existingSecret: influxdb-auth

Upvotes: 0

Views: 1100

Answers (1)

agilob
agilob

Reputation: 6233

To anyone here coming here from the future. Make sure you run:

echo $(kubectl get secret influxdb-influxdb2-auth -o "jsonpath={.data['admin-password']}" --namespace monitoring | base64 --decode)

after first installation. First time influxdb2 starts it will setup task, subsequent helm install/upgrade seem to save new password in the secret which isn't on the file system.

I had to delete content of PVC for influxdb and rerun installation.

Upvotes: 1

Related Questions