k8s
This commit is contained in:
36
k8s/environments/logging/elk/logstash/configmap.yaml
Normal file
36
k8s/environments/logging/elk/logstash/configmap.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
#kubectl create configmap logstash-configmap --from-file=config/logstash.yml --from-file=pipeline/logstash.conf
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: logstash-configmap
|
||||
labels:
|
||||
env: production
|
||||
tier: backend
|
||||
app: logstash
|
||||
name: logstash-configmap
|
||||
data:
|
||||
logstash.conf: |
|
||||
# LogstashTcpSocketAppender
|
||||
input {
|
||||
tcp {
|
||||
port => 8088
|
||||
codec => json_lines
|
||||
}
|
||||
}
|
||||
|
||||
output {
|
||||
elasticsearch {
|
||||
hosts => "http://elasticsearch.default.svc.cluster.local:9200"
|
||||
}
|
||||
}
|
||||
logstash.yml: |-
|
||||
# http.host: "0.0.0.0"
|
||||
http.host: "127.0.0.1"
|
||||
path.config: /usr/share/logstash/pipeline
|
||||
# pipeline.workers: 2
|
||||
|
||||
## X-Pack security credentials
|
||||
#
|
||||
# xpack.monitoring.enabled: true
|
||||
# xpack.monitoring.elasticsearch.username: elastic
|
||||
# xpack.monitoring.elasticsearch.password: changeme
|
||||
55
k8s/environments/logging/elk/logstash/deplyment.yaml
Normal file
55
k8s/environments/logging/elk/logstash/deplyment.yaml
Normal file
@@ -0,0 +1,55 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: logstash-deployment
|
||||
labels:
|
||||
env: production
|
||||
tier: backend
|
||||
app: logstash
|
||||
name: logstash-deployment
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
env: production
|
||||
tier: backend
|
||||
app: logstash
|
||||
name: logstash-pod
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
env: production
|
||||
tier: backend
|
||||
app: logstash
|
||||
name: logstash-pod
|
||||
spec:
|
||||
containers:
|
||||
- name: logstash
|
||||
image: docker.elastic.co/logstash/logstash:7.10.1
|
||||
ports:
|
||||
- containerPort: 8088
|
||||
resources:
|
||||
requests:
|
||||
cpu: 300m
|
||||
memory: 512Mi
|
||||
limits:
|
||||
cpu: 300m
|
||||
memory: 512Mi
|
||||
volumeMounts:
|
||||
- name: logstash-config-volume
|
||||
mountPath: /usr/share/logstash/config
|
||||
- name: logstash-pipeline-volume
|
||||
mountPath: /usr/share/logstash/pipeline
|
||||
volumes:
|
||||
- name: logstash-config-volume
|
||||
configMap:
|
||||
name: logstash-configmap
|
||||
items:
|
||||
- key: logstash.yml
|
||||
path: logstash.yml
|
||||
- name: logstash-pipeline-volume
|
||||
configMap:
|
||||
name: logstash-configmap
|
||||
items:
|
||||
- key: logstash.conf
|
||||
path: logstash.conf
|
||||
19
k8s/environments/logging/elk/logstash/service.yaml
Normal file
19
k8s/environments/logging/elk/logstash/service.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: logstash
|
||||
labels:
|
||||
env: production
|
||||
tier: backend
|
||||
app: logstash
|
||||
name: logstash-service
|
||||
spec:
|
||||
selector:
|
||||
env: production
|
||||
tier: backend
|
||||
app: logstash
|
||||
name: logstash-pod
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8088
|
||||
targetPort: 8088
|
||||
Reference in New Issue
Block a user