How to configure a service Account for loki to use IRSA in AWS Kubernetes
we are running bigbang/loki on eks. To access the s3 bucket on aws, we want to use the aws IRSA. To do this we need to configure a service account. Example from Grafana Loki with AWS S3 backend through IRSA in AWS Kubernetes Cluster:
config:
schema_config:
configs:
- from: 2020-05-15
store: boltdb-shipper
object_store: s3
schema: v11
index:
period: 24h
prefix: loki_index_
storage_config:
aws:
region: eu-central-1
bucketnames: alex-loki-test
s3forcepathstyle: false
#s3forcepathstyle: true <-- This is the main culprit; comment it out ? -? https://github.com/grafana/loki/issues/7024
boltdb_shipper:
shared_store: s3
cache_ttl: 24h
serviceAccount:
create: true
name: loki-sa
annotations:
eks.amazonaws.com/role-arn: "arn:aws:iam::09xx7:role/loki_s3_role"