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