terraformgoogle-kubernetes-enginekubernetes-helmgrafana-loki

Error "Mkdir /loki/tsdb-shipper-active: read-only file system" with Loki Helm Chart in GKE cluster


I am trying to set up Helm chart Loki in the GCP cluster. How do I manage this error?

“mkdir /loki/tsdb-shipper-active: read-only file system

error initialising module: store”

values.yaml:

loki:
  auth_enabled: false

  commonConfig:
    ring:
      instance_addr: 127.0.0.1
      kvstore:
        store: inmemory
    replication_factor: 1
    path_prefix: /loki

  storage:
    bucketNames:
      chunks: ab7d14a0f02ac9ab-loki-logs-bucket
    type: gcs

  schemaConfig:
    configs:
      - from: 2024-07-22
        store: tsdb
        object_store: gcs
        schema: v13
        index:
          prefix: index_
          period: 24h

  storageConfig:
    tsdb_shipper:
      active_index_directory: /loki/index
      cache_location: /loki/index_cache
    gcs:
      bucket_name: ab7d14a0f02ac9ab-loki-logs-bucket

serviceAccount:
  annotations:
    iam.gke.io/gcp-service-account: "loki-sa@linear-reporter.iam.gserviceaccount.com"

Solution

  • Simple solution

      storageConfig:
    tsdb_shipper:
      active_index_directory: var/loki/index
      cache_location: var/loki/index_cache
      cache_ttl: 24h