96 lines
2.5 KiB
YAML
96 lines
2.5 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: grafana-stack
|
|
labels:
|
|
app: grafana-stack
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: grafana-stack
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: grafana-stack
|
|
spec:
|
|
containers:
|
|
- name: grafana
|
|
image: docker.io/grafana/grafana:latest
|
|
ports:
|
|
- containerPort: 3000
|
|
hostPort: 3000
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- mountPath: /etc/grafana/grafana.ini:U
|
|
name: grafana-config
|
|
- mountPath: /var/lib/grafana:U
|
|
name: grafana
|
|
- name: loki
|
|
image: docker.io/grafana/loki:latest
|
|
args:
|
|
- --config.file=/mnt/config/loki-local-config.yaml
|
|
securityContext:
|
|
runAsUser: 1000
|
|
ports:
|
|
- containerPort: 3100
|
|
hostPort: 3100
|
|
protocol: TCP
|
|
- containerPort: 9096
|
|
hostPort: 9096
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- mountPath: /tmp/loki:U
|
|
name: loki
|
|
- mountPath: /mnt/config/loki-local-config.yaml:U
|
|
name: loki-config
|
|
- name: elastic
|
|
image: docker.elastic.co/elasticsearch/elasticsearch:8.15.3
|
|
#args:
|
|
#- --config.file=/usr/share/elasticsearch/config/elasticsearch.yaml
|
|
securityContext:
|
|
runAsUser: 1000
|
|
env:
|
|
- name: ELASTIC_PASSWORD
|
|
value: "hehe"
|
|
ports:
|
|
- containerPort: 9200
|
|
hostPort: 9200
|
|
protocol: TCP
|
|
- containerPort: 9300
|
|
hostPort: 9300
|
|
protocol: TCP
|
|
- containerPort: 9096
|
|
hostPort: 9096
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- mountPath: /var:U
|
|
name: elastic
|
|
- mountPath: /usr/share/elasticsearch/config:U
|
|
name: elastic-config
|
|
volumes:
|
|
- hostPath:
|
|
path: ./grafana/data
|
|
type: Directory
|
|
name: grafana
|
|
- hostPath:
|
|
path: ./grafana/grafana.ini
|
|
type: File
|
|
name: grafana-config
|
|
- hostPath:
|
|
path: ./loki/data
|
|
type: Directory
|
|
name: loki
|
|
- hostPath:
|
|
path: ./loki/loki-local-config.yaml
|
|
type: File
|
|
name: loki-config
|
|
- hostPath:
|
|
path: ./elastic/data
|
|
type: Directory
|
|
name: elastic
|
|
- hostPath:
|
|
path: ./elastic/
|
|
type: Directory
|
|
name: elastic-config
|