Master-Node Stack & README
This commit is contained in:
48
k3s-monitoring/loki-deploy.yml
Normal file
48
k3s-monitoring/loki-deploy.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: loki
|
||||
namespace: monitoring
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: loki
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: loki
|
||||
spec:
|
||||
nodeName: rpi-worker-monitor
|
||||
containers:
|
||||
- name: loki
|
||||
image: grafana/loki:2.9.0 # 문서에서 쓰던 버전으로 맞추면 됨
|
||||
args:
|
||||
- "-config.file=/etc/loki/loki-config.yml"
|
||||
ports:
|
||||
- containerPort: 3100
|
||||
volumeMounts:
|
||||
- name: loki-config
|
||||
mountPath: /etc/loki
|
||||
- name: loki-data
|
||||
mountPath: /loki
|
||||
volumes:
|
||||
- name: loki-config
|
||||
configMap:
|
||||
name: loki-config
|
||||
- name: loki-data
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: loki
|
||||
namespace: monitoring
|
||||
spec:
|
||||
selector:
|
||||
app: loki
|
||||
type: NodePort
|
||||
ports:
|
||||
- port: 3100
|
||||
targetPort: 3100
|
||||
nodePort: 30102 # ★ promtail이 접근할 NodePort
|
||||
Reference in New Issue
Block a user