我正在尝试运行 loki stack。通过文件运行 helm 命令grafana-loki.yaml
-
loki:
enabled: true
persistence:
enabled: true
storageClassName: azurefile-csi-loki
size: 1Gi
promtail:
enabled: true
# fluent-bit:
# enabled: false
grafana:
enabled: true
sidecar:
datasources:
enabled: true
image:
tag: 7.5.0
# prometheus:
# enabled: false
通过以下方式创建存储类名称 -
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: azurefile-csi-loki
provisioner: file.csi.azure.com
allowVolumeExpansion: true
parameters:
csi.storage.k8s.io/provisioner-secret-name: azure-secret
csi.storage.k8s.io/provisioner-secret-namespace: management
csi.storage.k8s.io/node-stage-secret-name: azure-secret
csi.storage.k8s.io/node-stage-secret-namespace: management
csi.storage.k8s.io/controller-expand-secret-name: azure-secret
csi.storage.k8s.io/controller-expand-secret-namespace: management
resourceGroup: iot # optional, only set this when storage account is not in the same resource group as agent node
storageAccount: aksrediscache
shareName: loki-storage
reclaimPolicy: Retain
mountOptions:
- dir_mode=0777
- file_mode=0777
- uid=0
- gid=0
- mfsymlinks
- cache=strict # https://linux.die.net/man/8/mount.cifs
- nosharesock # reduce probability of reconnect race
- actimeo=30 # reduce latency for metadata-heavy workload
当我运行 helm 命令时出现以下错误 -
helm upgrade -i loki-stack grafana/loki-stack -f grafana-loki.yaml -n management
level=info ts=2021-08-28T14:52:20.459348779Z caller=main.go:130 msg="Starting Loki" version="(version=2.2.0, branch=HEAD, revision=a27c79913)"
level=info ts=2021-08-28T14:52:20.459628282Z caller=server.go:229 http=[::]:3100 grpc=[::]:9095 msg="server listening on addresses"
level=info ts=2021-08-28T14:52:20.459704683Z caller=modules.go:477 msg="RulerStorage is not configured in single binary mode and will not be started."
level=info ts=2021-08-28T14:52:20.527680699Z caller=table_manager.go:241 msg="loading table index_18867"
level=error ts=2021-08-28T14:52:20.667955983Z caller=log.go:106 msg="error running loki" err="invalid database\nerror creating index client\ngithub.com/cortexproject/cortex/pkg/chunk/storage.NewStore\n\t/src/loki/vendor/github.com/cortexproject/cortex/pkg/chunk/storage/factory.go:179\ngithub.com/grafana/loki/pkg/loki.(*Loki).initStore\n\t/src/loki/pkg/loki/modules.go:319\ngithub.com/cortexproject/cortex/pkg/util/modules.(*Manager).initModule\n\t/src/loki/vendor/github.com/cortexproject/cortex/pkg/util/modules/modules.go:103\ngithub.com/cortexproject/cortex/pkg/util/modules.(*Manager).InitModuleServices\n\t/src/loki/vendor/github.com/cortexproject/cortex/pkg/util/modules/modules.go:75\ngithub.com/grafana/loki/pkg/loki.(*Loki).Run\n\t/src/loki/pkg/loki/loki.go:220\nmain.main\n\t/src/loki/cmd/loki/main.go:132\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:204\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1374\nerror initialising module: store\ngithub.com/cortexproject/cortex/pkg/util/modules.(*Manager).initModule\n\t/src/loki/vendor/github.com/cortexproject/cortex/pkg/util/modules/modules.go:105\ngithub.com/cortexproject/cortex/pkg/util/modules.(*Manager).InitModuleServices\n\t/src/loki/vendor/github.com/cortexproject/cortex/pkg/util/modules/modules.go:75\ngithub.com/grafana/loki/pkg/loki.(*Loki).Run\n\t/src/loki/pkg/loki/loki.go:220\nmain.main\n\t/src/loki/cmd/loki/main.go:132\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:204\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1374"
我不确定为什么尽管 PVC 安装成功但还是会出现错误 -
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
storage-grafana-loki-0 Bound pvc-2e3023d3-2922-444d-a127-4f131c069bd2 1Gi RWO azurefile-csi-loki 41m
storage-loki-stack-0 Bound pvc-8ece834f-fd24-43ad-9121-40794b72fd1c 1Gi RWO azurefile-csi-loki 31m
有人能帮我吗?