Skip to content

fix: when deploy grafana pods CrashLoopBackOff "mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied" #211

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions install/kubernetes/prometheus/grafana/grafana-dp.yml
Original file line number Diff line number Diff line change
@@ -24,6 +24,13 @@ spec:
operator: In
values:
- "true"
initContainers:
- name: modify-volume-permission
image: busybox:1.36.0
command: ["sh","-c","chown 472 /var/lib/grafana/"]
volumeMounts:
- mountPath: /var/lib/grafana
name: grafana-storage
containers:
- name: grafana
image: grafana/grafana:9.1.5
@@ -70,8 +77,10 @@ spec:
- mountPath: /grafana-dashboard-definitions/0/
name: all-grafana-dashboards
readOnly: false
# securityContext:
# fsGroup: 472
securityContext:
fsGroup: 472
supplementalGroups:
- 0
# runAsNonRoot: true
# runAsUser: 65534
serviceAccountName: grafana