Promtail with basic_auth installtion is creating Crashloopbackoff status in pod

When i was installing the promtail in a cluster with basic auth in “extraClientConfigs” , pod status is going to a crashloopbackoff state.If i remove basic auth from “extraClientConfigs”, pod status is showing as running. Actually the expected output should be with basic_auth pod status should be in running state.

basic auth code snippet

extraClientConfigs:
basic_auth:
username: admin
password: admin
tls_config:
insecure_skip_verify: true
error :Unable to parse config: /etc/promtail/promtail.yaml: yaml: line 6: did not find expected ‘-’ indicator

Please help to resolve the issue

@lijom200 I have same issue, did you find a solution?

you can fix this by editing clients block on helm chart and add basic auth username and password over there:

    server:
      log_level: {{ .Values.config.logLevel }}
      http_listen_port: {{ .Values.config.serverPort }}

    clients:
      - url: {{ tpl .Values.config.lokiAddress . }}
        basic_auth:
          username: <USERNAME>
          password: <PASSWORD>
      {{- with .Values.config.snippets.extraClientConfigs }}
      {{- toYaml . | nindent 2 }}
      {{- end }}

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.