mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Docs: fix "How To Deploy Grafana to K8s" documentation yaml file (#32918)
* removes storageClassName from PVC config * adds securityContext to `spec.template.spec` solves permissions errors for /var/lib/grafana mountPath * bumps grafana image to v7.5.2 * adds livenessProbe to spec.template.spec.containers * tweaks container resources and volume name Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
This commit is contained in:
parent
d2bdb4ed41
commit
92e394c0c8
@ -19,14 +19,13 @@ If you are interested in Grafana Enterprise (not Grafana OS), jump to [Deploy Gr
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: grafana
|
||||
name: grafana-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
storageClassName: local-path
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
@ -43,10 +42,14 @@ spec:
|
||||
labels:
|
||||
app: grafana
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 472
|
||||
supplementalGroups:
|
||||
- 0
|
||||
containers:
|
||||
- image: grafana/grafana:latest
|
||||
- name: grafana
|
||||
image: grafana/grafana:7.5.2
|
||||
imagePullPolicy: IfNotPresent
|
||||
name: grafana
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
name: http-grafana
|
||||
@ -61,19 +64,25 @@ spec:
|
||||
periodSeconds: 30
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 2
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
tcpSocket:
|
||||
port: 3000
|
||||
timeoutSeconds: 1
|
||||
resources:
|
||||
limits:
|
||||
memory: 4Gi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 2Gi
|
||||
cpu: 250m
|
||||
memory: 750Mi
|
||||
volumeMounts:
|
||||
- mountPath: /var/lib/grafana
|
||||
name: grafana
|
||||
name: grafana-pv
|
||||
volumes:
|
||||
- name: grafana
|
||||
- name: grafana-pv
|
||||
persistentVolumeClaim:
|
||||
claimName: grafana
|
||||
claimName: grafana-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
Loading…
Reference in New Issue
Block a user