-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsidecar.yaml
42 lines (40 loc) · 1.03 KB
/
sidecar.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx-app
replicas: 3
template:
metadata:
name: nginx-pod
labels:
app: nginx-app
spec:
containers:
- name: nginx-instance
image: nginx
imagePullPolicy: Always
ports:
- containerPort: 80
volumeMounts:
- mountPath: /app/log
name: log-volume
- name: filebeat
image: elastic/filebeat:6.5.4
imagePullPolicy: IfNotPresent
volumeMounts:
- mountPath: /usr/share/filebeat/filebeat.yml
subPath: filebeat.yml
name: filebeat-nginx-configmap
- mountPath: /app/log
name: log-volume
volumes:
- name: log-volume
emptyDir: {}
- name: filebeat-nginx-configmap
configMap:
name: filebeat-nginx
# kubectl create configmap filebeat-nginx-configmap --from-file=filebeat.yml