解决方案
我们通过 Helm 进行 Promtail 安装部署;
helm repo add grafana https://grafana.github.io/helm-charts helm pull grafana/promtail # promtail-5.0.0.tgz helm show values ./promtail-5.0.0.tgz > promtail-5.0.0.helm-values.yaml vim promtail-5.0.0.helm-values.yaml ...(0)config.clients:http://loki-loki-distributed-gateway.loki.svc.cluster.local/loki/api/v1/push ...(1)config.clients:添加 Basic Auth 认证; ...(2)config.clients:通过 external_labels 字段,来添加集群标签,以区分日志来源; # helm --namespace=observing-client --create-namespace \ upgrade --install promtail \ ./promtail-5.0.0.tgz -f promtail-5.0.0.helm-values.yaml