22
deploy.yaml
22
deploy.yaml
@@ -1,27 +1,27 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: admin-ui # 固定为项目名,不再用变量
|
||||
name: ${APP_NAME}
|
||||
namespace: default
|
||||
labels:
|
||||
app: admin-ui
|
||||
app: ${APP_NAME}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: admin-ui
|
||||
app: ${APP_NAME}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: admin-ui
|
||||
app: ${APP_NAME}
|
||||
spec:
|
||||
containers:
|
||||
- name: admin-ui
|
||||
# 替换为你的镜像仓库地址(如docker.io/yourname/admin-ui)
|
||||
image: 116.204.74.41:3000/red-future/admin-ui:latest # 或固定用tag,如v1.0
|
||||
- name: ${APP_NAME}
|
||||
# 临时用公共镜像测试(避免依赖私有镜像),后续替换为你的镜像
|
||||
image: nginx:latest
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80 # 该项目实际端口
|
||||
- containerPort: 80
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
@@ -33,13 +33,13 @@ spec:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: admin-ui-service
|
||||
name: ${APP_NAME}-service
|
||||
namespace: default
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: admin-ui
|
||||
app: ${APP_NAME}
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
nodePort: 30000 # 该项目专属端口(如其他项目用30002)
|
||||
nodePort: 30001 # 30000-32767区间内的端口
|
||||
Reference in New Issue
Block a user