promtail安装失败

如果在搭建集群时有修改过Docker的存储路径,请修改此处路径与其对应

改了路径
image
也会报错


感觉是k8s的权限问题 读不到文件

如果在搭建集群时有修改过 kubelet 的存储路径,请修改此处路径与其对应

把配置修改为这样,在部署一遍试一试

loki:
  serviceName: loki
volumeMounts:
- mountPath: /root/docker/data/containers
  name: docker
  readOnly: true
- mountPath: /var/log/pods
  name: pods
  readOnly: true
volumes:
- hostPath:
    path: /root/docker/data/containers
  name: docker
- hostPath:
    path: /var/log/pods
  name: pods

image


Not ready: Unable to find any logs to tail. Please verify permissions, volumes, scrape_config, etc.\n" ws: false; Accept-Encoding: gzip; Connection: close

我根据提示做好了,你需要找到自己的容器存储路径