loki持久化


查看配置

# 查看helm安装Loki默认配置
[root@master ~]# helm inspect values loki/loki > loki.yaml
[root@master ~]# cat loki.yaml
# 部分配置
config:
  storage_config:
    boltdb:
      directory: /data/loki/index
    filesystem:
      directory: /data/loki/chunks
  table_manager:
    retention_deletes_enabled: false
    retention_period: 0

image:
  repository: grafana/loki
  tag: v1.2.0
  pullPolicy: IfNotPresent

## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/
## If you set enabled as "True", you need :
## - create a pv which above 10Gi and has same namespace with loki
## - keep storageClassName same with below setting
persistence:
  enabled: false
  accessModes:
  - ReadWriteOnce
  size: 10Gi
  annotations: {}
  # subPath: ""
  # existingClaim:

配置循环删除

配置持久化

persistence:
  enabled: true
  accessModes:
  - ReadWriteOnce
  size: 100Gi
  annotations: {}
  existingClaim: loki-pvc

创建PVC

kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: loki-pvc
  namespace: monitoring
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
        storage: 100Gi
  storageClassName: nfs-client
# 卸载重新安装
helm delete --purge loki
helm install loki/loki --name loki --namespace monitoring -f loki.yaml

# 升级命令
helm upgrade loki --values loki.yaml loki/loki

文章作者: wuzhiyong
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 wuzhiyong !
评论
 上一篇
mysql密码安全策略 mysql密码安全策略
密码复杂度校验MySQL5.6.6版本之后增加了密码强度验证插件validate_password. -- 查看插件是否安装 mysql> SELECT PLUGIN_NAME, PLUGIN_STATUS FROM INFORMATION
2020-08-20
下一篇 
docker网络模式 docker网络模式
网络模式 Docker网络模式 配置 说明 host –net=host 容器和宿主机共享Network namespace。 container –net=container:NAME 容器和另外一个容器共享Network
2020-08-18
  目录