update prod mongo

main
ycz008 2024-04-20 20:39:10 +08:00
parent 254e907bda
commit 360a30779f
1 changed files with 20 additions and 7 deletions

View File

@ -1,17 +1,17 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: StatefulSet kind: StatefulSet
metadata: metadata:
name: mongo name: mongo-rs0
spec: spec:
replicas: 3 replicas: 3
serviceName: mongo serviceName: mongo-rs0
selector: selector:
matchLabels: matchLabels:
app: mongo app: mongo-rs0
template: template:
metadata: metadata:
labels: labels:
app: mongo app: mongo-rs0
spec: spec:
initContainers: initContainers:
- name: init - name: init
@ -102,7 +102,7 @@ spec:
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: mongo name: mongo-rs0-0
spec: spec:
ports: ports:
- name: mongo - name: mongo
@ -111,5 +111,18 @@ spec:
targetPort: 27017 targetPort: 27017
type: ClusterIP type: ClusterIP
selector: selector:
app: mongo app: mongo-rs0
---
apiVersion: v1
kind: Service
metadata:
name: mongo-rs0
spec:
ports:
- name: mongo
protocol: TCP
port: 27017
targetPort: 27017
type: ClusterIP
selector:
app: mongo-rs0