mirror of
https://github.com/Noratrieb/vps.git
synced 2026-01-17 01:55:10 +01:00
aa
This commit is contained in:
parent
4caaf53c8e
commit
6274818d1f
5 changed files with 1 additions and 0 deletions
57
old-kube/mongo.yaml
Normal file
57
old-kube/mongo.yaml
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: mongo
|
||||
labels:
|
||||
app: mongo
|
||||
spec:
|
||||
ports:
|
||||
- port: 27017
|
||||
name: mongodb
|
||||
clusterIP: None
|
||||
selector:
|
||||
app: mongo
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: mongo
|
||||
spec:
|
||||
serviceName: mongo
|
||||
selector:
|
||||
matchLabels:
|
||||
app: mongo
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mongo
|
||||
spec:
|
||||
containers:
|
||||
- name: mongo
|
||||
image: mongo:latest
|
||||
command:
|
||||
- "mongod"
|
||||
- "--bind_ip"
|
||||
- "0.0.0.0"
|
||||
resources:
|
||||
limits:
|
||||
cpu: 400m
|
||||
memory: 200M
|
||||
ports:
|
||||
- containerPort: 27017
|
||||
volumeMounts:
|
||||
- name: mongodb-data
|
||||
mountPath: /data/db
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: mongodb
|
||||
volumeClaimTemplates:
|
||||
- metadata:
|
||||
name: mongodb-data
|
||||
spec:
|
||||
accessModes: [ "ReadWriteOnce" ]
|
||||
storageClassName: "standard"
|
||||
resources:
|
||||
requests:
|
||||
storage: 100M
|
||||
Loading…
Add table
Add a link
Reference in a new issue