Loki за конфигурацией https ingress с helm

Есть ли способ настроить promtail для отправки логов на локи через https-вход?

promtail ---> https-ingress ---> loki

Я использовал эту рулевую диаграмму выпускной и настроил адрес локи как http://gateway.loki.monitoring.example.com:80/loki/api/v1/push. После развертывания диаграммы promtail я вижу ниже ошибки в модуле promtail

level=error ts=2022-03-28T14:10:23.740581978Z caller=client.go:360 component=client host=gateway.loki.monitoring.example.com:80 msg = "f
inal error sending batch" status=308 error = "server returned HTTP status 308 Permanent Redirect (308): <html>"

Я даже указал https в URL-адресе loki как https://gateway.loki.monitoring.example.com:80/loki/api/v1/push, но все равно не получается

level=warn ts=2022-03-28T14:27:47.976570998Z caller=client.go:349 component=client host=gateway.loki.monitoring.example:80 msg = "er
ror sending batch, will retry" status=-1 error = "Post \"https://gateway.loki.monitoring.example.com:80/loki/api/v1/push\": http: server
 gave HTTP response to HTTPS client"

Я нашел этот конфиг https://grafana.com/docs/loki/latest/installation/helm/#run-loki-behind-https-ingress, но он устарел

ПРИМЕЧАНИЕ:

  • Я не настроил https на стороне loki.
  • Настроен вход диаграммы loki-distributed, как показано ниже (и конфигурация остальных входов по умолчанию)
...
  ingress:
    # -- Specifies whether an ingress for the gateway should be created
    enabled: true
    # -- Ingress Class Name. MAY be required for Kubernetes versions >= 1.18
    ingressClassName: monitoring-ingress
    # -- Annotations for the gateway ingress
    annotations:
      cert-manager.io/cluster-issuer: monitoring-cluster-issuer
    # -- Hosts configuration for the gateway ingress
    hosts:
      - host: gateway.loki.monitoring.example.com
        paths:
          - path: /
            # -- pathType (e.g. ImplementationSpecific, Prefix, .. etc.) might also be required by some Ingress Controllers
            pathType: Prefix
    # -- TLS configuration for the gateway ingress
    tls:
      - secretName: loki-gateway-tls-certs
        hosts:
          - gateway.loki.monitoring.example.com
...

Я пропустил какую-либо конфигурацию входа в loki?

Развертывание модели машинного обучения с помощью Flask - Angular в Kubernetes
Развертывание модели машинного обучения с помощью Flask - Angular в Kubernetes
Kubernetes - это портативная, расширяемая платформа с открытым исходным кодом для управления контейнерными рабочими нагрузками и сервисами, которая...
0
0
47
1
Перейти к ответу Данный вопрос помечен как решенный

Ответы 1

Ответ принят как подходящий

Поиграв некоторое время, я понял, что мне нужно удалить порт и указать https для URL-адреса локи. Должно быть как показано ниже

https://gateway.loki.monitoring.example.com/loki/api/v1/push

Другие вопросы по теме