安装监控组件 ,pv,pvc 不会自动创建

level=info ts=2020-04-02T07:13:19.159Z caller=main.go:332 msg="Starting Prometheus" version="(version=2.13.1, branch=HEAD, revision=6f92ce56053866194ae5937012c1bec40f1dd1d9)"
level=info ts=2020-04-02T07:13:19.159Z caller=main.go:333 build_context="(go=go1.13.1, user=root@88e419aa1676, date=20191017-13:15:01)"
level=info ts=2020-04-02T07:13:19.159Z caller=main.go:334 host_details="(Linux 5.5.11-1.el7.elrepo.x86_64 #1 SMP Fri Mar 20 10:34:37 EDT 2020 x86_64 prometheus-prometheus-operator-prometheus-0 (none))"
level=info ts=2020-04-02T07:13:19.159Z caller=main.go:335 fd_limits="(soft=1048576, hard=1048576)"
level=info ts=2020-04-02T07:13:19.159Z caller=main.go:336 vm_limits="(soft=unlimited, hard=unlimited)"
level=error ts=2020-04-02T07:13:19.161Z caller=query_logger.go:85 component=activeQueryTracker msg="Error opening query log file" file=/prometheus/queries.active err="open /prometheus/queries.active: permission denied"
panic: Unable to create mmap-ed active query log

goroutine 1 [running]:
github.com/prometheus/prometheus/promql.NewActiveQueryTracker(0x7ffe572c7102, 0xb, 0x14, 0x29db1e0, 0xc0005d7cb0, 0x29db1e0)
	/app/promql/query_logger.go:115 +0x48c
main.main()
	/app/cmd/prometheus/main.go:364 +0x5229

如果 pvc 没有成功创建,请检查 storageClass,将它设置成你集群中 storageClass。

自己创建的 PVC 需要给挂载目录授权

chmod 777 -R <path>