dockerfile
Some checks failed
全局K3s部署 / deploy (push) Has been cancelled

This commit is contained in:
2026-05-23 16:47:35 +08:00
parent 301b03e97f
commit 7316d551ce
2 changed files with 45 additions and 1 deletions

View File

@@ -1,5 +1,4 @@
name: 全局K3s部署
on:
push:
branches: [master]

45
deploy.yaml Normal file
View File

@@ -0,0 +1,45 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: admin-ui # 固定为项目名,不再用变量
namespace: default
labels:
app: admin-ui
spec:
replicas: 1
selector:
matchLabels:
app: admin-ui
template:
metadata:
labels:
app: admin-ui
spec:
containers:
- name: admin-ui
# 替换为你的镜像仓库地址如docker.io/yourname/admin-ui
image: 116.204.74.41:3000/red-future/admin-ui:latest # 或固定用tag如v1.0
imagePullPolicy: Always
ports:
- containerPort: 80 # 该项目实际端口
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi
---
apiVersion: v1
kind: Service
metadata:
name: admin-ui-service
namespace: default
spec:
type: NodePort
selector:
app: admin-ui
ports:
- port: 80
targetPort: 80
nodePort: 80 # 该项目专属端口如其他项目用30002