Install Grafana Loki
KubeRocketCI configures the logging with the help of Grafana Loki aggregation system.
Installation​
To install Loki, follow the steps below:
-
Create logging namespace:
kubectl create namespace logging -
Add a chart repository:
helm repo add grafana https://grafana.github.io/helm-chartshelm repo updatenoteIt is possible to use Amazon Simple Storage Service Amazon S3 as an object storage for Loki. To configure access, please refer to the IRSA for Loki documentation.
-
Install Loki v.2.6.0:
helm install loki grafana/loki \--version 2.6.0 \--values values.yaml \--namespace loggingCheck out the values.yaml file sample of the Loki customization:
View: values.yaml
image:repository: grafana/lokitag: 2.3.0config:auth_enabled: falseschema_config:configs:- from: 2021-06-01store: boltdb-shipperobject_store: s3schema: v11index:prefix: loki_index_period: 24hstorage_config:aws:s3: s3://<AWS_REGION>/loki-<CLUSTER_NAME>boltdb_shipper:active_index_directory: /data/loki/indexcache_location: /data/loki/boltdb-cacheshared_store: s3chunk_store_config:max_look_back_period: 24hresources:limits:memory: "128Mi"requests:cpu: "50m"memory: "128Mi"serviceAccount:create: truename: edp-lokiannotations:eks.amazonaws.com/role-arn: "arn:aws:iam::<AWS_ACCOUNT_ID>:role/AWSIRSA‹CLUSTER_NAME›‹LOKI_NAMESPACE›Lokipersistence:enabled: false -
Configure custom bucket policy to delete the old data.