Permalink
Switch branches/tags
Nothing to show
Find file Copy path
192dafa Dec 21, 2017
1 contributor

Users who have contributed to this file

94 lines (92 sloc) 1.99 KB
---
apiVersion: v1
kind: ConfigMap
metadata:
name: logstash-application
namespace: elasticsearch
data:
logstash.conf: |-
input {
tcp {
port => 5044
codec => "json"
}
}
output {
elasticsearch {
hosts => "elasticsearch-logging.elasticsearch:9200"
index => "logstash-%{+YYYY.MM.dd}"
sniffing => false
}
}
logstash.yml: |-
http.host: "0.0.0.0"
path.config: /usr/share/logstash/pipeline
xpack.monitoring.enabled: false
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: logstash-application
namespace: elasticsearch
spec:
template:
metadata:
labels:
app: logstash-application
spec:
containers:
- image: docker.elastic.co/logstash/logstash:5.5.0
name: logstash-application
ports:
- name: logstash
containerPort: 5044
protocol: TCP
volumeMounts:
- name: config
mountPath: /usr/share/logstash/config/logstash.yml
subPath: logstash.yml
readOnly: true
- name: pipeline
mountPath: /usr/share/logstash/pipeline
readOnly: true
args:
- -f
- /usr/share/logstash/pipeline/logstash.conf
resources:
limits:
memory: 2Gi
cpu: "200m"
requests:
memory: 2Gi
cpu: "200m"
volumes:
- name: pipeline
configMap:
name: logstash-application
items:
- key: logstash.conf
path: logstash.conf
- name: config
configMap:
name: logstash-application
items:
- key: logstash.yml
path: logstash.yml
---
apiVersion: v1
kind: Service
metadata:
name: logstash-application
namespace: elasticsearch
labels:
app: logstash-application
spec:
type: LoadBalancer
selector:
app: logstash-application
ports:
- name: logstash
port: 5044
targetPort: 5044
protocol: TCP