mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-16 01:25:09 +01:00
karin
This commit is contained in:
parent
3f0a29eabf
commit
68768a3e7c
4 changed files with 109 additions and 0 deletions
62
kube/mongo.yaml
Normal file
62
kube/mongo.yaml
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mongodb-service
|
||||
labels:
|
||||
name: mongo
|
||||
spec:
|
||||
ports:
|
||||
- port: 27017
|
||||
targetPort: 27017
|
||||
clusterIP: None
|
||||
selector:
|
||||
role: mongo
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: mongod
|
||||
spec:
|
||||
serviceName: mongodb-service
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
role: mongo
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
role: mongo
|
||||
environment: test
|
||||
replicaset: MainRepSet
|
||||
spec:
|
||||
terminationGracePeriodSeconds: 10
|
||||
containers:
|
||||
- name: mongod-container
|
||||
image: mongo
|
||||
command:
|
||||
- "mongod"
|
||||
- "--bind_ip"
|
||||
- "0.0.0.0"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 0.2
|
||||
memory: 200Mi
|
||||
limits:
|
||||
cpu: 0.3
|
||||
memory: 300Mi
|
||||
ports:
|
||||
- containerPort: 27017
|
||||
volumeMounts:
|
||||
- name: mongodb-persistent-storage-claim
|
||||
mountPath: /data/db
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: mongodb-persistent-storage-claim
|
||||
annotations:
|
||||
volume.beta.kubernetes.io/storage-class: "standard"
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
Loading…
Add table
Add a link
Reference in a new issue