Post

[Kubernetes] Loki Stack

[Kubernetes] Loki Stack

Helm 설치 및 설명 참고

Install the Loki Stack Helm charts

1
2
3
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
helm install loki-stack grafana/loki-stack --namespace [NAMESPACE NAME] --version [VERSION]

Loki Stack - Helm 설치 참고

Customize Default Configuration

  • values.yaml 수정

    최상위 values.yaml을 수정하면 하위 폴더 values.yaml을 override 한다.

    • Chart
      • https://github.com/grafana/helm-charts/tree/main/charts/loki-stack
    • Release file (.tgz)
      • https://github.com/grafana/helm-charts/releases

Setting Promtail

1
2
3
4
5
6
7
promtail:
  enabled: true
  config:
    logLevel: info
    serverPort: 3101
    clients:
      - url: http://{{ .Release.Name }}:3100/loki/api/v1/push

Promtail 설치 및 설정 관련 참고

Setting Loki

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
loki:
  enabled: true
  isDefault: true
  url: http://{{(include "loki.serviceName" .)}}:{{ .Values.loki.service.port }}
  readinessProbe:
    httpGet:
      path: /ready
      port: http-metrics
    initialDelaySeconds: 45
  livenessProbe:
    httpGet:
      path: /ready
      port: http-metrics
    initialDelaySeconds: 45
  datasource:
    jsonData: "{}"
    uid: ""

Loki 설정 관련 참고

Setting Grafana

1
2
3
4
5
6
7
8
9
10
grafana:
  enabled: false
  sidecar:
    datasources:
      label: ""
      labelValue: ""
      enabled: true
      maxLines: 1000
  image:
    tag: 10.3.3

Grafana 설치 및 설정 관련 참고

Install Customize Default Configuration

1
helm install [RELEASE NAME] [Chart.yaml 경로] -f [YAML 파일 또는 URL에 값 지정 (여러 개를 지정가능)] -n [NAMESPACE NAME]
1
helm install loki-stack grafana/loki-stack -f override-values.yaml -n [NAMESPACE NAME]

Uninstall the Chart

1
helm uninstall [RELEASE NAME] -n [NAMESPACE NAME]
This post is licensed under CC BY 4.0 by the author.