Grafana-loki
小于 1 分钟
loki配置
拉取charts
helm pull oci://registry-1.docker.io/bitnamicharts/grafana-loki --version 2.18.0
loki:
gossipRing:
service:
annotations: {}
compactor:
enabled: true
persistence:
enabled: true
accessModes:
- ReadWriteOnce
size: 2Gi
service:
type: ClusterIP
annotations:
kubernetes.io/ingress.class: nginx
networkPolicy:
enabled: true
gateway:
enabled: true
auth:
enabled: false
username: "admin"
password: "admin"
existingSecret: ""
service:
type: ClusterIP
annotations:
kubernetes.io/ingress.class: nginx
ingress:
enabled: true
hostname: grafana-loki.zili.work
annotations:
kubernetes.io/ingress.class: nginx
indexGateway:
## @param indexGateway.enabled Enable index-gateway deployment
##
enabled: false
distributor:
replicaCount: 1
resources: {}
networkPolicy:
enabled: true
ingester:
resources: {}
persistence:
enabled: true
size: 2Gi
networkPolicy:
enabled: true
querier:
replicaCount: 1
persistence:
enabled: true
size: 2Gi
networkPolicy:
enabled: true
queryFrontend:
replicaCount: 1
networkPolicy:
enabled: true
queryScheduler:
networkPolicy:
enabled: true
ruler:
enabled: false
tableManager:
enabled: false
promtail:
enabled: true
logLevel: info
安装
helm upgrade --install grafana-loki . -f loki-values.yaml -n middleware --create-namespace
Data source querier
(k8s内)
通过label 即可查询对应的日志
模版导入
下载模板:https://grafana.com/grafana/dashboards/15141-kubernetes-service-logs/?tab=revisions