Du kan inte välja fler än 25 ämnen
Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
|
- # deployment 配置
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: connect-deployment
- namespace: egg-im
- labels:
- app: connect
- spec:
- replicas: 1
- selector:
- matchLabels:
- app: connect
- template:
- metadata:
- labels:
- app: connect
- spec:
- containers:
- - name: connect
- image: 'registry.cn-shenzhen.aliyuncs.com/fnuoos-prd/egg-im-connect:0.0.2'
- imagePullPolicy: Always
- ports:
- - containerPort: 8000
- - containerPort: 8001
- - containerPort: 8002
- volumeMounts: # 映射文件为宿主机文件
- - mountPath: /log/
- name: log
- env:
- - name: POD_IP
- valueFrom:
- fieldRef:
- fieldPath: status.podIP
- volumes:
- - name: log
- hostPath:
- path: /log/
- ---
- # service 配置
- apiVersion: v1
- kind: Service
- metadata:
- name: connect
- namespace: egg-im
- labels:
- app: connect # 只有设置label,才能被服务发现找到
- spec:
- selector:
- app: connect
- ports:
- - name: rpclisten
- protocol: TCP
- port: 8000
- targetPort: 8000
- - name: tcplisten
- protocol: TCP
- port: 8001
- targetPort: 8001
- - name: wslisten
- protocol: TCP
- port: 8002
- targetPort: 8002
|