added conf files for k8s
This commit is contained in:
61
elk-stack/deployment-logstash.yaml
Normal file
61
elk-stack/deployment-logstash.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: logstash
|
||||
namespace: elk-stack
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: logstash
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: logstash
|
||||
spec:
|
||||
containers:
|
||||
- name: logstash
|
||||
image: docker.elastic.co/logstash/logstash:8.11.0
|
||||
ports:
|
||||
- containerPort: 5044
|
||||
- containerPort: 5000
|
||||
- containerPort: 9600
|
||||
env:
|
||||
- name: LS_JAVA_OPTS
|
||||
value: "-Xms256m -Xmx256m"
|
||||
volumeMounts:
|
||||
- name: logstash-config
|
||||
mountPath: /usr/share/logstash/config/logstash.yml
|
||||
subPath: logstash.yml
|
||||
- name: logstash-pipeline
|
||||
mountPath: /usr/share/logstash/pipeline/pipeline.conf
|
||||
subPath: pipeline.conf
|
||||
volumes:
|
||||
- name: logstash-config
|
||||
configMap:
|
||||
name: logstash-config
|
||||
- name: logstash-pipeline
|
||||
configMap:
|
||||
name: logstash-config
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: logstash
|
||||
namespace: elk-stack
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: logstash
|
||||
ports:
|
||||
- name: beats
|
||||
port: 5044
|
||||
targetPort: 5044
|
||||
- name: tcp
|
||||
port: 5000
|
||||
targetPort: 5000
|
||||
- name: monitoring
|
||||
port: 9600
|
||||
targetPort: 9600
|
||||
|
||||
|
||||
Reference in New Issue
Block a user