add es yaml
parent
b8d345f361
commit
5918c0627d
|
@ -2,7 +2,7 @@
|
|||
apiVersion: elasticsearch.k8s.elastic.co/v1
|
||||
kind: Elasticsearch
|
||||
metadata:
|
||||
name: bfs-trainer
|
||||
name: bfs-elasticsearch
|
||||
spec:
|
||||
version: 8.8.0
|
||||
volumeClaimDeletePolicy: DeleteOnScaledownOnly
|
||||
|
@ -52,4 +52,5 @@ kind: StorageClass
|
|||
metadata:
|
||||
name: local-elastic
|
||||
provisioner: openebs.io/local
|
||||
allowVolumeExpansion: true
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
apiVersion: kibana.k8s.elastic.co/v1
|
||||
kind: Kibana
|
||||
metadata:
|
||||
name: bfs-kibana
|
||||
spec:
|
||||
version: 8.8.0
|
||||
count: 1
|
||||
elasticsearchRef:
|
||||
name: "bfs-elasticsearch"
|
||||
podTemplate:
|
||||
spec:
|
||||
containers:
|
||||
- name: kibana
|
||||
env:
|
||||
- name: NODE_OPTIONS
|
||||
value: "--max-old-space-size=2048"
|
||||
resources:
|
||||
requests:
|
||||
memory: 256Mi
|
||||
cpu: 0.1
|
||||
limits:
|
||||
memory: 2.5Gi
|
||||
cpu: 2
|
||||
http:
|
||||
tls:
|
||||
selfSignedCertificate:
|
||||
disabled: true
|
|
@ -0,0 +1,98 @@
|
|||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: mongodb-local
|
||||
provisioner: kubernetes.io/no-provisioner
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: mongodb-pvc-local
|
||||
spec:
|
||||
storageClassName: mongodb-local
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 3Gi
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: mongodb-pv-local
|
||||
labels:
|
||||
type: local
|
||||
spec:
|
||||
storageClassName: mongodb-local
|
||||
claimRef:
|
||||
name: mongodb-pvc-local
|
||||
# ref: PersistentVolumeClaim
|
||||
namespace: basic
|
||||
capacity:
|
||||
storage: 20Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
local:
|
||||
path: /data/mongodb
|
||||
nodeAffinity:
|
||||
required:
|
||||
nodeSelectorTerms:
|
||||
- matchExpressions:
|
||||
- key: kubernetes.io/hostname
|
||||
operator: In
|
||||
values:
|
||||
- bfs-k8snode-10-2-1-8.hetzner.base.beaconfireinc.com
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mongodb
|
||||
spec:
|
||||
selector:
|
||||
app: mongodb
|
||||
ports:
|
||||
- name: mongodb
|
||||
protocol: TCP
|
||||
port: 27017
|
||||
targetPort: 27017
|
||||
nodePort: 30018
|
||||
type: NodePort
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: mongodb
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mongodb
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mongodb
|
||||
spec:
|
||||
containers:
|
||||
- name: mongodbs
|
||||
image: mongo:4.4
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: MONGO_INITDB_ROOT_USERNAME
|
||||
value: root
|
||||
- name: MONGO_INITDB_ROOT_PASSWORD
|
||||
value: 'root@123'
|
||||
ports:
|
||||
- containerPort: 27017
|
||||
volumeMounts:
|
||||
- name: mongodb-data
|
||||
mountPath: /data/db
|
||||
volumes:
|
||||
- name: mongodb-data
|
||||
persistentVolumeClaim:
|
||||
claimName: mongodb-pvc-local
|
Loading…
Reference in New Issue