-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploymongo.yml
More file actions
51 lines (50 loc) · 1010 Bytes
/
deploymongo.yml
File metadata and controls
51 lines (50 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
apiVersion: apps/v1
kind: Deployment
metadata:
name: mongodb-deployment
spec:
replicas: 1
selector:
matchLabels:
app: mongodb
template:
metadata:
labels:
app: mongodb
spec:
securityContext:
fsGroup: 999
seccompProfile:
type: RuntimeDefault
containers:
- name: mongodb
image: mongo:6.0
imagePullPolicy: IfNotPresent
ports:
- containerPort: 27017
volumeMounts:
- name: datadir
mountPath: /data/db
securityContext:
runAsUser: 999
runAsNonRoot: true
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
volumes:
- name: datadir
emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
name: mongodb-service
spec:
type: NodePort
ports:
- port: 27017
targetPort: 27017
nodePort: 30007
selector:
app: mongodb