Create 13-13-mongo.yaml
This commit is contained in:
parent
73227fcad9
commit
ccd91a2eb7
35
13-13-mongo.yaml
Normal file
35
13-13-mongo.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
apiVersion: apps/v1beta1
|
||||
kind: StatefulSet
|
||||
metadata:
|
||||
name: mongo
|
||||
spec:
|
||||
serviceName: "mongo"
|
||||
replicas: 3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: mongo
|
||||
spec:
|
||||
containers:
|
||||
- name: mongodb
|
||||
image: mongo:3.4.1
|
||||
command:
|
||||
- mongod
|
||||
- --replSet
|
||||
- rs0
|
||||
ports:
|
||||
- containerPort: 27017
|
||||
name: web
|
||||
# This container initializes the mongodb, then sleeps.
|
||||
- name: init-mongo
|
||||
image: mongo:3.4.1
|
||||
command:
|
||||
- bash
|
||||
- /config/init.sh
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: /config
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: "mongo-init"
|
||||
Loading…
Reference in New Issue
Block a user