kubernetes-handbook/manifests/test/logstash-test.yaml

56 lines
1.2 KiB
YAML
Raw Normal View History

2017-05-15 19:38:58 +08:00
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: logstash-test
namespace: default
spec:
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
memory: 500M
2017-05-15 19:38:58 +08:00
volumeMounts:
- name: app-logs
2017-05-15 19:38:58 +08:00
mountPath: /log
env:
- name: LogFile
value: '["/log/*","/log/usermange/common/*"]'
2017-05-15 19:38:58 +08:00
- name: ES_SERVER
value: 172.23.5.255:9200
2017-05-15 19:38:58 +08:00
- name: INDICES
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
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