ff18784983
Build & Deploy / build-and-deploy (push) Failing after 11s
- image: Gitea registry → 서버 로컬 registry(localhost:5000)로 변경 - Service: ClusterIP + Ingress → NodePort(30200/30201) + Traefik docker dynamic 파일 - deploy/traefik-dynamic.yml: /opt/docker/traefik/dynamic/insurance.yml 배치용 - scripts/deploy-remote.sh: 서버 수동 배포 스크립트 (build→push→k3s apply→traefik 설정) - legacy ingress.yaml / ingressroute-traefik.yaml 제거 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
104 lines
2.3 KiB
YAML
104 lines
2.3 KiB
YAML
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: uploads
|
|
namespace: insurance
|
|
spec:
|
|
accessModes: ["ReadWriteOnce"]
|
|
resources:
|
|
requests:
|
|
storage: 20Gi
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: insurance-api
|
|
namespace: insurance
|
|
labels:
|
|
app.kubernetes.io/name: insurance-api
|
|
spec:
|
|
replicas: 2
|
|
revisionHistoryLimit: 3
|
|
strategy:
|
|
type: RollingUpdate
|
|
rollingUpdate:
|
|
maxSurge: 1
|
|
maxUnavailable: 0
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: insurance-api
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: insurance-api
|
|
spec:
|
|
containers:
|
|
- name: api
|
|
image: localhost:5000/insurance/api:latest
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- name: http
|
|
containerPort: 4000
|
|
env:
|
|
- name: PORT
|
|
value: "4000"
|
|
- name: HOST
|
|
value: "0.0.0.0"
|
|
- name: NODE_ENV
|
|
value: production
|
|
- name: UPLOAD_DIR
|
|
value: /data/uploads
|
|
- name: JWT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: api-secrets
|
|
key: jwtSecret
|
|
- name: DATABASE_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: api-secrets
|
|
key: databaseUrl
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /health
|
|
port: http
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 20
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 128Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
volumeMounts:
|
|
- name: uploads
|
|
mountPath: /data/uploads
|
|
volumes:
|
|
- name: uploads
|
|
persistentVolumeClaim:
|
|
claimName: uploads
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: insurance-api
|
|
namespace: insurance
|
|
labels:
|
|
app.kubernetes.io/name: insurance-api
|
|
spec:
|
|
type: NodePort
|
|
selector:
|
|
app.kubernetes.io/name: insurance-api
|
|
ports:
|
|
- name: http
|
|
port: 4000
|
|
targetPort: http
|
|
nodePort: 30201
|