You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
950 B
44 lines
950 B
2 years ago
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: feedback-deployment
|
||
|
namespace: dev
|
||
|
labels:
|
||
|
app: feedback
|
||
|
spec:
|
||
|
replicas: 2 # 节点资源
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: feedback
|
||
|
template:
|
||
|
metadata: # 资源的元数据/属性
|
||
|
labels: # 设定资源的标签
|
||
|
app: feedback
|
||
|
spec:
|
||
|
containers:
|
||
|
- image: registry.internal.jumaiyx.cn/jm/feedback:1 # 自动化版本往后配置
|
||
|
name: feedback
|
||
|
imagePullPolicy: Always
|
||
|
ports:
|
||
|
- name: grpc
|
||
|
containerPort: 9000
|
||
|
protocol: TCP
|
||
|
imagePullSecrets:
|
||
|
- name: registry-harbor
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: feedback-service # 改名字对应服务发现serviceName
|
||
|
namespace: dev
|
||
|
labels:
|
||
|
name: feedback
|
||
|
spec:
|
||
|
type: ClusterIP
|
||
|
ports:
|
||
|
- name: grpc
|
||
|
port: 9000
|
||
|
targetPort: grpc
|
||
|
protocol: TCP
|
||
|
selector:
|
||
|
app: feedback
|