2 Star 1 Fork 0

我小时候可帅啦/基础框架

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
kubernetes-test.yaml 4.33 KB
一键复制 编辑 原始数据 按行查看 历史
王鹏 提交于 2021-10-07 10:57 +08:00 . dev部署文件修改
---
# 命名空间
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/luelueluewp/basic-framework.git
[email protected]:luelueluewp/basic-framework.git
luelueluewp
basic-framework
基础框架
master

搜索帮助