代码拉取完成,页面将自动刷新
---
# 命名空间
apiVersion: v1
kind: Namespace
metadata:
name: basic-${profile}
---
#用户中心
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-user-deployment
namespace: basic-${profile}
labels:
app: demo-user-app
version: v1
spec:
replicas: 1
selector:
matchLabels:
app: demo-user-app
template:
spec:
containers:
- name: user-center-pod
image: 47.97.206.189:5000/basic-user-center-${profile}${container_version}
imagePullPolicy: IfNotPresent
env:
- name: JAVA_OPTS
value: ${JAVA_OPTS} ${JAVA_OPTS_USER_CENTER}
ports:
- containerPort: 80
name: web
protocol: TCP
- containerPort: 20880
name: dubbo
protocol: TCP
readinessProbe: #就绪探针
httpGet:
port: 80
path: /uc/actuator
initialDelaySeconds: 60 #启动后60秒开始检测
periodSeconds: 10 #每10秒检测一次
timeoutSeconds: 5 #探测超时时间
livenessProbe: #存活探针
httpGet:
port: 80
path: /uc/actuator
initialDelaySeconds: 120 #启动后120秒开始检测
periodSeconds: 60 #每60秒检测一次
timeoutSeconds: 5 #探测超时时间
metadata:
labels:
app: demo-user-app
---
#订单中心
apiVersion: apps/v1
kind: Deployment
metadata:
name: demo-order-deployment
namespace: basic-${profile}
labels:
app: demo-order-app
version: v1
spec:
replicas: 1
selector:
matchLabels:
app: demo-order-app
template:
spec:
containers:
- name: order-center-pod
image: 47.97.206.189:5000/basic-order-center-dev${container_version}
imagePullPolicy: IfNotPresent
env:
- name: JAVA_OPTS
value: ${JAVA_OPTS} ${JAVA_OPTS_ORDER_CENTER}
ports:
- containerPort: 80
name: web
protocol: TCP
- containerPort: 20880
name: dubbo
protocol: TCP
readinessProbe: #就绪探针
httpGet:
port: 80
path: /oc/actuator
initialDelaySeconds: 60 #启动后60秒开始检测
periodSeconds: 10 #每10秒检测一次
timeoutSeconds: 5 #探测超时时间
livenessProbe: #存活探针
httpGet:
port: 80
path: /oc/actuator
initialDelaySeconds: 120 #启动后120秒开始检测
periodSeconds: 60 #每60秒检测一次
timeoutSeconds: 5 #探测超时时间
metadata:
labels:
app: demo-order-app
---
#网关
apiVersion: apps/v1
kind: Deployment
metadata:
name: sc-gateway-deployment
namespace: basic-${profile}
labels:
app: sc-gateway-app
version: v1
spec:
replicas: 1
selector:
matchLabels:
app: sc-gateway-app
template:
spec:
containers:
- name: sc-gateway-pod
image: 47.97.206.189:5000/basic-sc-gateway-dev${container_version}
imagePullPolicy: IfNotPresent
env:
- name: JAVA_OPTS
value: ${JAVA_OPTS} ${JAVA_OPTS_GATEWAY}
ports:
- containerPort: 80
name: sc-gateway-web
protocol: TCP
readinessProbe: #就绪探针
httpGet:
port: 80
path: /oc/actuator
initialDelaySeconds: 60 #启动后60秒开始检测
periodSeconds: 10 #每10秒检测一次
timeoutSeconds: 5 #探测超时时间
livenessProbe: #存活探针
httpGet:
port: 80
path: /oc/actuator
initialDelaySeconds: 120 #启动后120秒开始检测
periodSeconds: 60 #每60秒检测一次
timeoutSeconds: 5 #探测超时时间
metadata:
labels:
app: sc-gateway-app
project: basic-app
---
#服务配置
apiVersion: v1
kind: Service
metadata:
name: demo-app-service
namespace: basic-${profile}
labels:
app: demo-app
version: v1
spec:
type: NodePort
ports:
- port: 80
name: demo-app-web
targetPort: sc-gateway-web
protocol: TCP
nodePort: 30001
selector:
project: basic-app
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。