InfluxDB 2 is deployed as a StatefulSet on your cluster.

You can access it by using the service name: {{ template "influxdb.fullname" . }}

To retrieve the password for the '{{ .Values.adminUser.user}}' user:

{{- if .Values.adminUser.existingSecret }}

  echo $(kubectl get secret {{ .Values.adminUser.existingSecret }} -o "jsonpath={.data['admin-password']}" --namespace {{ .Release.Namespace }} | base64 --decode)

{{- else }}

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

{{- end }}

Note: with enabled persistence, admin password is only set once during the initial deployment. The password is not changed when InfluxDB 2 is re-deployed with different password.