working prometheus and grafana on master node
This commit is contained in:
parent
b5986f15d9
commit
f3b4b755cf
@ -12,14 +12,30 @@ spec:
|
||||
labels:
|
||||
app: grafana
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: raspberrypi
|
||||
securityContext:
|
||||
fsGroup: 472
|
||||
supplementalGroups:
|
||||
- 0
|
||||
containers:
|
||||
- name: grafana
|
||||
image: grafana/grafana:10.4.1
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
volumeMounts:
|
||||
- name: grafana-data
|
||||
mountPath: /var/lib/grafana
|
||||
name: http-grafana
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /robots.txt
|
||||
port: 3000
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 30
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: 3000
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
resources:
|
||||
requests:
|
||||
memory: "256Mi"
|
||||
@ -27,10 +43,15 @@ spec:
|
||||
limits:
|
||||
memory: "512Mi"
|
||||
cpu: "500m"
|
||||
volumeMounts:
|
||||
- name: grafana-data
|
||||
mountPath: /var/lib/grafana
|
||||
volumes:
|
||||
- name: grafana-data
|
||||
persistentVolumeClaim:
|
||||
claimName: grafana-data-pvc
|
||||
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
|
||||
@ -3,8 +3,9 @@ kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: grafana-data-pvc
|
||||
spec:
|
||||
storageClassName: local-path
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
storage: 5Gi
|
||||
@ -12,6 +12,8 @@ spec:
|
||||
labels:
|
||||
app: prometheus
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: raspberrypi
|
||||
containers:
|
||||
- name: prometheus
|
||||
image: prom/prometheus:v2.52.0
|
||||
|
||||
@ -3,8 +3,9 @@ kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: prometheus-data-pvc
|
||||
spec:
|
||||
storageClassName: local-path
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 20Gi
|
||||
storage: 20Gi
|
||||
Loading…
Reference in New Issue
Block a user