2017-05-15 19:38:58 +08:00
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: logstash-test
|
|
|
|
namespace: default
|
|
|
|
spec:
|
2017-05-16 16:51:17 +08:00
|
|
|
replicas: 3
|
2017-05-15 19:38:58 +08:00
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
k8s-app: logstash-test
|
|
|
|
spec:
|
|
|
|
containers:
|
2018-05-04 19:48:54 +08:00
|
|
|
- image: harbor-001.jimmysong.io/library/logstash:5.3.0
|
2017-05-15 19:38:58 +08:00
|
|
|
name: logstash
|
|
|
|
resources:
|
|
|
|
requests:
|
|
|
|
cpu: 100m
|
2017-05-16 16:51:17 +08:00
|
|
|
memory: 500M
|
2017-05-15 19:38:58 +08:00
|
|
|
volumeMounts:
|
2017-05-15 21:37:08 +08:00
|
|
|
- name: app-logs
|
2017-05-15 19:38:58 +08:00
|
|
|
mountPath: /log
|
|
|
|
env:
|
|
|
|
- name: LogFile
|
2017-05-16 16:51:17 +08:00
|
|
|
value: '["/log/*","/log/usermange/common/*"]'
|
2017-05-15 19:38:58 +08:00
|
|
|
- name: ES_SERVER
|
2017-05-15 21:37:08 +08:00
|
|
|
value: 172.23.5.255:9200
|
2017-05-15 19:38:58 +08:00
|
|
|
- name: INDICES
|
2017-05-15 21:37:08 +08:00
|
|
|
value: logstash-docker
|
2017-05-15 19:38:58 +08:00
|
|
|
- name: CODEC
|
|
|
|
value: plain
|
2018-05-04 19:48:54 +08:00
|
|
|
- image: harbor-001.jimmysong.io/library/analytics-docker-test:Build_8
|
2017-05-15 19:38:58 +08:00
|
|
|
name : app
|
2017-05-16 19:01:25 +08:00
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
2017-05-15 19:38:58 +08:00
|
|
|
volumeMounts:
|
|
|
|
- name: app-logs
|
2017-05-15 21:37:08 +08:00
|
|
|
mountPath: /usr/local/TalkingData/logs
|
2017-05-15 19:38:58 +08:00
|
|
|
volumes:
|
|
|
|
- name: app-logs
|
|
|
|
emptyDir: {}
|
2017-05-16 19:01:25 +08:00
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: logstash-test
|
|
|
|
labels:
|
|
|
|
app: logstash-test
|
|
|
|
spec:
|
|
|
|
ports:
|
|
|
|
- port: 80
|
|
|
|
protocol: TCP
|
|
|
|
name: http
|
|
|
|
selector:
|
2017-07-18 22:22:27 +08:00
|
|
|
k8s-app: logstash-test
|