Files
insurance/deploy/k8s/deployment.yaml
T
chpark 035eb0259f
Build & Deploy / build-and-deploy (push) Failing after 1m56s
feat: Kubernetes 자동 배포 파이프라인 구축
- Dockerfile: Expo web export → nginx multi-stage 빌드
- nginx.conf: SPA fallback, gzip, health endpoint
- K8s manifests: namespace, deployment (2 replicas), service, ingress
- Traefik IngressRoute (선택적) 포함
- Gitea Actions workflow: push 시 빌드→Gitea Registry push→rollout restart
- DEPLOY.md: 초기 설정 가이드 (kubeconfig, secrets, DNS)

Domain: insurance.junggomoa.com

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 23:59:51 +09:00

62 lines
1.6 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: insurance-web
namespace: insurance
labels:
app.kubernetes.io/name: insurance-web
app.kubernetes.io/component: frontend
spec:
replicas: 2
revisionHistoryLimit: 3
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
selector:
matchLabels:
app.kubernetes.io/name: insurance-web
template:
metadata:
labels:
app.kubernetes.io/name: insurance-web
annotations:
kubectl.kubernetes.io/restartedAt: "placeholder-will-be-patched-by-ci"
spec:
imagePullSecrets:
- name: gitea-registry
containers:
- name: web
image: git.junggomoa.com/chpark/insurance:latest
imagePullPolicy: Always
ports:
- name: http
containerPort: 80
protocol: TCP
readinessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 3
periodSeconds: 5
livenessProbe:
httpGet:
path: /health
port: http
initialDelaySeconds: 15
periodSeconds: 20
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 300m
memory: 256Mi
securityContext:
allowPrivilegeEscalation: false
runAsNonRoot: false
capabilities:
drop: ["ALL"]
add: ["CHOWN", "SETGID", "SETUID", "NET_BIND_SERVICE"]