Files
admin-ui/deploy.yaml

45 lines
939 B
YAML
Raw Normal View History

2026-05-23 16:47:35 +08:00
apiVersion: apps/v1
kind: Deployment
metadata:
2026-05-23 17:11:40 +08:00
name: ${APP_NAME}
2026-05-23 16:47:35 +08:00
namespace: default
labels:
2026-05-23 17:11:40 +08:00
app: ${APP_NAME}
2026-05-23 16:47:35 +08:00
spec:
replicas: 1
selector:
matchLabels:
2026-05-23 17:11:40 +08:00
app: ${APP_NAME}
2026-05-23 16:47:35 +08:00
template:
metadata:
labels:
2026-05-23 17:11:40 +08:00
app: ${APP_NAME}
2026-05-23 16:47:35 +08:00
spec:
containers:
2026-05-23 17:11:40 +08:00
- name: ${APP_NAME}
# 临时用公共镜像测试(避免依赖私有镜像),后续替换为你的镜像
image: nginx:latest
2026-05-23 16:47:35 +08:00
imagePullPolicy: Always
ports:
2026-05-23 17:11:40 +08:00
- containerPort: 80
2026-05-23 16:47:35 +08:00
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
---
apiVersion: v1
kind: Service
metadata:
2026-05-23 17:11:40 +08:00
name: ${APP_NAME}-service
2026-05-23 16:47:35 +08:00
namespace: default
spec:
type: NodePort
selector:
2026-05-23 17:11:40 +08:00
app: ${APP_NAME}
2026-05-23 16:47:35 +08:00
ports:
- port: 80
targetPort: 80
2026-05-23 17:11:40 +08:00
nodePort: 30001 # 30000-32767区间内的端口