add elk stack
This commit is contained in:
4106
deploy/elasticsearch/elastic-opereator.yaml
Normal file
4106
deploy/elasticsearch/elastic-opereator.yaml
Normal file
File diff suppressed because it is too large
Load Diff
22
deploy/elasticsearch/elasticsearch.yaml
Normal file
22
deploy/elasticsearch/elasticsearch.yaml
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
apiVersion: elasticsearch.k8s.elastic.co/v1
|
||||||
|
kind: Elasticsearch
|
||||||
|
metadata:
|
||||||
|
name: elasticsearch-ha
|
||||||
|
namespace: elasticsearch
|
||||||
|
spec:
|
||||||
|
version: 7.17.0
|
||||||
|
nodeSets:
|
||||||
|
- name: default
|
||||||
|
count: 3
|
||||||
|
config:
|
||||||
|
node.store.allow_mmap: false # Recommended for containerized environments
|
||||||
|
volumeClaimTemplates:
|
||||||
|
- metadata:
|
||||||
|
name: elasticsearch-data
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: longhorn
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
||||||
10
deploy/elasticsearch/kibana.yaml
Normal file
10
deploy/elasticsearch/kibana.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: kibana.k8s.elastic.co/v1
|
||||||
|
kind: Kibana
|
||||||
|
metadata:
|
||||||
|
name: kibana-ha
|
||||||
|
namespace: elasticsearch
|
||||||
|
spec:
|
||||||
|
version: 7.17.0
|
||||||
|
count: 2
|
||||||
|
elasticsearchRef:
|
||||||
|
name: elasticsearch-ha
|
||||||
8
deploy/elasticsearch/kustomization.yaml
Normal file
8
deploy/elasticsearch/kustomization.yaml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
resources:
|
||||||
|
- elastic-opereator.yaml
|
||||||
|
- elasticsearch.yaml
|
||||||
|
- kibana.yaml
|
||||||
|
- longstash.yaml
|
||||||
58
deploy/elasticsearch/longstash.yaml
Normal file
58
deploy/elasticsearch/longstash.yaml
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: logstash
|
||||||
|
namespace: elasticsearch
|
||||||
|
spec:
|
||||||
|
replicas: 2
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: logstash
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: logstash
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: logstash
|
||||||
|
image: docker.io/bitnami/logstash:7.17.0
|
||||||
|
# Customize environment variables and command-line args as needed
|
||||||
|
env:
|
||||||
|
- name: ELASTICSEARCH_HOST
|
||||||
|
value: "elasticsearch-ha-es-http" # Adjust based on your ES service DNS name
|
||||||
|
ports:
|
||||||
|
- containerPort: 9600
|
||||||
|
volumeMounts:
|
||||||
|
- name: logstash-data
|
||||||
|
mountPath: /bitnami
|
||||||
|
volumes:
|
||||||
|
- name: logstash-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: logstash-pvc
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: logstash-pvc
|
||||||
|
namespace: elasticsearch
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: longhorn
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 10Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: logstash
|
||||||
|
namespace: elasticsearch
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app: logstash
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 9600
|
||||||
|
targetPort: 9600
|
||||||
5
deploy/gitea/values.yaml
Normal file
5
deploy/gitea/values.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
storageClass: longhorn
|
||||||
|
accessMode: ReadWriteOnce
|
||||||
|
size: 20Gi
|
||||||
Reference in New Issue
Block a user