Files
open-im-server/deploy_k8s/msg_gateway/deployment.yaml
T

53 lines
1.1 KiB
YAML
Raw Normal View History

2022-05-30 20:10:01 +08:00
---
2022-05-23 00:55:56 +08:00
apiVersion: apps/v1
kind: Deployment
metadata:
name: msg-gateway-deployment
spec:
selector:
matchLabels:
app: msg-gateway # 选择这个指定标签执行
2022-07-01 00:14:59 +08:00
replicas: 1 # 运行pod数量
2022-05-23 00:55:56 +08:00
template:
metadata:
labels:
app: msg-gateway # 标签
spec:
containers:
- name: msg-gateway
2022-08-30 11:31:45 +08:00
image: openim/msg_gateway:v2.3.0release
2022-06-05 23:42:27 +08:00
# imagePullPolicy: Always
2022-05-23 00:55:56 +08:00
ports:
2022-05-30 20:07:01 +08:00
- name: rpc-port
containerPort: 10140
- name: ws-port
containerPort: 10001
2022-05-23 00:55:56 +08:00
volumeMounts:
- name: config
mountPath: /Open-IM-Server/config
readOnly: true
2022-08-30 16:30:08 +08:00
env:
- name: CONFIG_NAME
value: "/Open-IM-Server"
2022-05-23 00:55:56 +08:00
volumes:
- name: config
configMap:
2022-07-01 00:14:59 +08:00
name: openim-config
2022-05-23 00:55:56 +08:00
strategy: #更新策略
type: RollingUpdate # 滚动更新
---
apiVersion: v1
kind: Service
metadata:
name: msg-gateway
spec:
ports:
- name: msg-gateway-port
protocol: TCP
port: 10001
2022-05-30 20:07:01 +08:00
targetPort: ws-port
2022-05-23 00:55:56 +08:00
selector:
2022-05-23 14:24:46 +08:00
app: msg-gateway
2022-06-16 00:19:41 +08:00
type: NodePort
2022-05-23 00:55:56 +08:00