dockerfile
Some checks failed
全局K3s部署 / deploy (push) Failing after 5s

This commit is contained in:
2026-05-23 17:18:52 +08:00
parent 61a6c143ad
commit dedabb332e
2 changed files with 10 additions and 57 deletions

View File

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