Ver3.0 ๐ ArgoCD๋ก GitOps ๋ฐฐํฌ ์๋ํ ๊ตฌ์ถํ๊ธฐ: ๊ฐ๋ฐ์์ ์๋ก์ด ๋ฌด๊ธฐ

๐ ArgoCD๋ก GitOps ๋ฐฐํฌ ์๋ํ ๊ตฌ์ถํ๊ธฐ: ๊ฐ๋ฐ์์ ์๋ก์ด ๋ฌด๊ธฐ
์ฟ ๋ฒ๋คํฐ์ค ๋ฐฐํฌ๋ฅผ Git์ผ๋ก ๊ด๋ฆฌํ๋ ํ์ ์ ์ธ ๋ฐฉ๋ฒ
์๋
! ํน์ ์ฟ ๋ฒ๋คํฐ์ค ๋ฐฐํฌํ ๋๋ง๋ค kubectl ๋ช
๋ น์ด ์น๋๋ผ ์๊ฐ๋ฝ ์ํ์ง ์์? ๐ค
๋ฐฐํฌ ํ์คํ ๋ฆฌ ๊ด๋ฆฌ๋ ์ ๋งคํ๊ณ , ๋๊ฐ ๋ญ ๋ฐฐํฌํ๋์ง ์ถ์ ํ๊ธฐ๋ ํ๋ค๊ณ ...
์ค๋์ ์ด๋ฐ ๊ณ ๋ฏผ์ ํ ๋ฐฉ์ ๋ ๋ ค์ค ArgoCD๋ฅผ ํ์ฉํ GitOps ๋ฐฐํฌ ์๋ํ์ ๋ํด ์ด์ผ๊ธฐํด๋ณผ๊ฒ!
์ด ๊ธ์ ๋ค ์ฝ๊ณ ๋๋ฉด ๋๋ Git Push ํ ๋ฒ์ผ๋ก ํ๋ก๋์
๋ฐฐํฌ๋ฅผ ์๋ํํ ์ ์์ ๊ฑฐ์ผ. ๐ช
๐ฏ GitOps๊ฐ ๋ญ๊ธธ๋ ์ด๋ ๊ฒ ๋๋ฆฌ์ผ?
๋จผ์ GitOps๊ฐ ๋ญ์ง๋ถํฐ ์์์ผ๊ฒ ์ง? ๊ฐ๋จํ๊ฒ ๋งํ๋ฉด Git์ ๋จ์ผ ์ง์ค ๊ณต๊ธ์(Single Source of Truth)์ผ๋ก ์ฌ์ฉํ๋ ์ด์ ๋ฐฉ์์ด์ผ. ๐
์ ํต์ ์ธ ๋ฐฉ์์์๋ ๊ฐ๋ฐ์๊ฐ ์ง์ kubectl ๋ช
๋ น์ด๋ฅผ ์น๊ฑฐ๋ CI/CD ํ์ดํ๋ผ์ธ์์ ๋ฐฐํฌ ์คํฌ๋ฆฝํธ๋ฅผ ์คํํ์ด. ๊ทผ๋ฐ ์ด ๋ฐฉ์์ ๋ช ๊ฐ์ง ๋ฌธ์ ๊ฐ ์์ด:
์ ํต์ ๋ฐฐํฌ ๋ฐฉ์์ ๋ฌธ์ ์ :
โข ๋๊ฐ ์ธ์ ๋ฌด์์ ๋ฐฐํฌํ๋์ง ์ถ์ ์ด ์ด๋ ค์ ๐
โข ๋ฐฐํฌ ์คํจ ์ ๋กค๋ฐฑ์ด ๋ณต์กํด
โข ์ฌ๋ฌ ํ๊ฒฝ(dev, staging, prod)์ ์ผ๊ด์ฑ ์ ์ง๊ฐ ํ๋ค์ด
โข ๋ฐฐํฌ ๊ถํ ๊ด๋ฆฌ๊ฐ ๊น๋ค๋ก์
โข ์ฌํด ๋ณต๊ตฌ ์ ํ์ฌ ์ํ๋ฅผ ์ ํํ ์ฌํํ๊ธฐ ์ด๋ ค์
GitOps๋ ์ด๋ฐ ๋ฌธ์ ๋ค์ Git์ ๊ฐ๋ ฅํ ๋ฒ์ ๊ด๋ฆฌ ๊ธฐ๋ฅ์ผ๋ก ํด๊ฒฐํด. ๋ชจ๋ ์ธํ๋ผ ์ํ๋ฅผ Git ์ ์ฅ์์ ์ฝ๋๋ก ์ ์ํ๊ณ , ์ค์ ํด๋ฌ์คํฐ ์ํ๋ฅผ Git ์ ์ฅ์์ ์ํ์ ์๋์ผ๋ก ๋๊ธฐํํ๋ ๊ฑฐ์ง! ๐
๐ก GitOps์ ํต์ฌ ์์น
1. ์ ์ธ์ ์ ์ (Declarative)
์์คํ
์ ์ํ๋ ์ํ๋ฅผ ์ ์ธ์ ์ผ๋ก ์ ์ํด. "์ด๋ ๊ฒ ํด๋ผ"๊ฐ ์๋๋ผ "์ด๋ฐ ์ํ์ฌ์ผ ํด"๋ผ๊ณ ๋งํ๋ ๊ฑฐ์ผ.
2. ๋ฒ์ ๊ด๋ฆฌ (Versioned and Immutable)
๋ชจ๋ ๋ณ๊ฒฝ์ฌํญ์ด Git์ ๊ธฐ๋ก๋๊ณ , ์ธ์ ๋ ์ด์ ๋ฒ์ ์ผ๋ก ๋์๊ฐ ์ ์์ด.
3. ์๋ ์ ์ฉ (Pulled Automatically)
์์ด์ ํธ๊ฐ Git ์ ์ฅ์๋ฅผ ์ง์์ ์ผ๋ก ๋ชจ๋ํฐ๋งํ๊ณ ๋ณ๊ฒฝ์ฌํญ์ ์๋์ผ๋ก ์ ์ฉํด.
4. ์ง์์ ์กฐ์ (Continuously Reconciled)
์ค์ ์ํ์ ์ํ๋ ์ํ๊ฐ ๋ค๋ฅด๋ฉด ์๋์ผ๋ก ๋ง์ถฐ์ค.
๐ ArgoCD๋ฅผ ์ ํํด์ผ ํ๋ ์ด์
GitOps๋ฅผ ๊ตฌํํ ์ ์๋ ๋๊ตฌ๋ ์ฌ๋ฌ ๊ฐ์ง๊ฐ ์์ด. Flux, Jenkins X, GitLab ๋ฑ๋ฑ... ๊ทธ๋ฐ๋ฐ ์ ArgoCD์ผ๊น? ๐ค
ArgoCD์ ๊ฐ๋ ฅํ ์ฅ์ ๋ค:
| ํน์ง | ์ค๋ช | ์ค๋ฌด ํ์ฉ๋ |
|---|---|---|
| ๐จ ์ง๊ด์ ์ธ UI | ์น ๊ธฐ๋ฐ ๋์๋ณด๋๋ก ๋ฐฐํฌ ์ํ๋ฅผ ํ๋์ ํ์ธ | โญโญโญโญโญ |
| ๐ ์๋ ๋๊ธฐํ | Git ๋ณ๊ฒฝ์ฌํญ์ ์๋์ผ๋ก ๊ฐ์งํ๊ณ ๋ฐฐํฌ | โญโญโญโญโญ |
| ๐ฏ ๋ฉํฐ ํด๋ฌ์คํฐ | ํ๋์ ArgoCD๋ก ์ฌ๋ฌ ํด๋ฌ์คํฐ ๊ด๋ฆฌ | โญโญโญโญ |
| ๐ RBAC ์ง์ | ์ธ๋ฐํ ๊ถํ ๊ด๋ฆฌ ๊ฐ๋ฅ | โญโญโญโญโญ |
| ๐ ํฌ์ค ์ฒดํฌ | ์ ํ๋ฆฌ์ผ์ด์ ์ํ๋ฅผ ์ค์๊ฐ ๋ชจ๋ํฐ๋ง | โญโญโญโญโญ |
| โฎ๏ธ ์ฌ์ด ๋กค๋ฐฑ | ํด๋ฆญ ํ ๋ฒ์ผ๋ก ์ด์ ๋ฒ์ ์ผ๋ก ๋ณต๊ตฌ | โญโญโญโญโญ |
ํนํ ์ฌ๋ฅ๋ท ๊ฐ์ ํ๋ซํผ์์ DevOps ๊ด๋ จ ์ฌ๋ฅ์ ๊ฑฐ๋ํ ๋, ArgoCD ๊ตฌ์ถ ๊ฒฝํ์ ์ ๋ง ํฐ ๊ฐ์ ์ด ๋ ์ ์์ด! ๋ง์ ๊ธฐ์ ๋ค์ด GitOps๋ก ์ ํํ๊ณ ์๊ฑฐ๋ . ๐ผ
๐ ๏ธ ArgoCD ์ค์นํ๊ธฐ - ์ค์ ๊ฐ์ด๋
์, ์ด์ ๋ณธ๊ฒฉ์ ์ผ๋ก ArgoCD๋ฅผ ์ค์นํด๋ณด์! ์๊ฐ๋ณด๋ค ๊ฐ๋จํด. ๐
์ฌ์ ์ค๋น์ฌํญ:
โข Kubernetes ํด๋ฌ์คํฐ (v1.19 ์ด์ ๊ถ์ฅ)
โข kubectl ๋ช
๋ น์ด ๋๊ตฌ
โข ์ต์ 2GB RAM, 2 CPU ์ฝ์ด
โข Git ์ ์ฅ์ (GitHub, GitLab, Bitbucket ๋ฑ)
Step 1: ArgoCD ๋ค์์คํ์ด์ค ์์ฑ
๋จผ์ ArgoCD๋ฅผ ์ํ ์ ์ฉ ๋ค์์คํ์ด์ค๋ฅผ ๋ง๋ค์ด์ค:
kubectl create namespace argocd
์ด๋ ๊ฒ ํ๋ฉด ArgoCD ๊ด๋ จ ๋ฆฌ์์ค๋ค์ด ๊น๋ํ๊ฒ ๋ถ๋ฆฌ๋ผ์ ๊ด๋ฆฌํ๊ธฐ ํธํด! ๐๏ธ
Step 2: ArgoCD ์ค์น
๊ณต์ ๋งค๋ํ์คํธ๋ฅผ ์ฌ์ฉํด์ ์ค์นํด๋ณด์:
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
์ด ๋ช
๋ น์ด ํ๋๋ก ArgoCD์ ๋ชจ๋ ์ปดํฌ๋ํธ๊ฐ ์ค์น๋ผ:
โข argocd-server (API ์๋ฒ ๋ฐ ์น UI)
โข argocd-repo-server (Git ์ ์ฅ์ ์ฐ๋)
โข argocd-application-controller (์ ํ๋ฆฌ์ผ์ด์
์ํ ๊ด๋ฆฌ)
โข argocd-dex-server (SSO ์ธ์ฆ)
โข argocd-redis (์บ์ ์ ์ฅ์)
Step 3: ์ค์น ํ์ธ
๋ชจ๋ Pod๊ฐ ์ ์์ ์ผ๋ก ์คํ๋๋์ง ํ์ธํด๋ณด์:
kubectl get pods -n argocd
๋ชจ๋ Pod์ STATUS๊ฐ Running์ด๋ฉด ์ฑ๊ณต! ๐
๋ณดํต 1-2๋ถ ์ ๋ ๊ฑธ๋ ค. ๋ง์ฝ Pending ์ํ๊ฐ ๊ณ์๋๋ฉด ๋ฆฌ์์ค๊ฐ ๋ถ์กฑํ ๊ฑฐ๋๊น ๋
ธ๋๋ฅผ ํ์ธํด๋ด.
Step 4: ArgoCD CLI ์ค์น (์ ํ์ฌํญ)
CLI๋ฅผ ์ฌ์ฉํ๋ฉด ๋ ํธํ๊ฒ ๊ด๋ฆฌํ ์ ์์ด. macOS ๊ธฐ์ค์ผ๋ก:
brew install argocd
Linux์์๋:
curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
chmod +x /usr/local/bin/argocd
Step 5: ArgoCD ์๋ฒ ์ ์ํ๊ธฐ
ArgoCD UI์ ์ ์ํ๋ ค๋ฉด ์๋น์ค๋ฅผ ์ธ๋ถ๋ก ๋ ธ์ถํด์ผ ํด. ์ฌ๋ฌ ๋ฐฉ๋ฒ์ด ์๋๋ฐ, ๊ฐ๋ฐ ํ๊ฒฝ์์๋ ํฌํธ ํฌ์๋ฉ์ด ๊ฐ์ฅ ๊ฐ๋จํด:
kubectl port-forward svc/argocd-server -n argocd 8080:443
์ด์ ๋ธ๋ผ์ฐ์ ์์ https://localhost:8080์ผ๋ก ์ ์ํ๋ฉด ArgoCD UI๋ฅผ ๋ณผ ์ ์์ด! ๐
ํ๋ก๋์
ํ๊ฒฝ์์๋ Ingress๋ฅผ ์ฌ์ฉํ๋ ๊ฒ ์ข์:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: argocd-server-ingress
namespace: argocd
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
ingressClassName: nginx
rules:
- host: argocd.yourdomain.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: argocd-server
port:
name: https
tls:
- hosts:
- argocd.yourdomain.com
secretName: argocd-secret
Step 6: ์ด๊ธฐ ๋น๋ฐ๋ฒํธ ํ์ธ
ArgoCD๋ ์ค์น ์ ์๋์ผ๋ก admin ๊ณ์ ์ ์์ฑํด. ์ด๊ธฐ ๋น๋ฐ๋ฒํธ๋ Secret์ ์ ์ฅ๋์ด ์์ด:
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d
์ด ๋น๋ฐ๋ฒํธ๋ก ๋ก๊ทธ์ธํ ํ ๊ผญ ๋ณ๊ฒฝํด์ค! ๋ณด์์ ์ค์ํ๋๊น. ๐
๐จ ์ฒซ ๋ฒ์งธ ์ ํ๋ฆฌ์ผ์ด์ ๋ฐฐํฌํ๊ธฐ
์ด์ ์ค์ ๋ก ์ ํ๋ฆฌ์ผ์ด์ ์ ๋ฐฐํฌํด๋ณด์! ๊ฐ๋จํ Nginx ์น ์๋ฒ๋ฅผ ์์ ๋ก ์ฌ์ฉํ ๊ฒ. ๐
Step 1: Git ์ ์ฅ์ ์ค๋น
๋จผ์ Git ์ ์ฅ์์ Kubernetes ๋งค๋ํ์คํธ๋ฅผ ์ค๋นํด์ผ ํด. ๋ค์๊ณผ ๊ฐ์ ๊ตฌ์กฐ๋ก ๋ง๋ค์ด๋ณด์:
my-app/
โโโ deployment.yaml
โโโ service.yaml
โโโ ingress.yaml
deployment.yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-app
labels:
app: nginx
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.21
ports:
- containerPort: 80
resources:
requests:
memory: "64Mi"
cpu: "100m"
limits:
memory: "128Mi"
cpu: "200m"
service.yaml:
apiVersion: v1
kind: Service
metadata:
name: nginx-service
spec:
selector:
app: nginx
ports:
- protocol: TCP
port: 80
targetPort: 80
type: ClusterIP
์ด ํ์ผ๋ค์ Git ์ ์ฅ์์ ์ปค๋ฐํ๊ณ ํธ์ํด์ค! ๐ค
Step 2: ArgoCD Application ์์ฑ (UI ๋ฐฉ์)
ArgoCD UI์ ๋ก๊ทธ์ธํ ํ:
1. + NEW APP ๋ฒํผ ํด๋ฆญ
2. ๋ค์ ์ ๋ณด ์
๋ ฅ:
โข Application Name: nginx-app
โข Project: default
โข Sync Policy: Automatic (์๋ ๋๊ธฐํ ์ํ๋ฉด)
โข Repository URL: ๋์ Git ์ ์ฅ์ URL
โข Revision: HEAD ๋๋ ํน์ ๋ธ๋์น
โข Path: my-app (๋งค๋ํ์คํธ๊ฐ ์๋ ๊ฒฝ๋ก)
โข Cluster URL: https://kubernetes.default.svc
โข Namespace: default
3. CREATE ๋ฒํผ ํด๋ฆญ! ๐ฏ
Step 3: ArgoCD Application ์์ฑ (CLI ๋ฐฉ์)
CLI๋ฅผ ์ ํธํ๋ค๋ฉด ์ด๋ ๊ฒ ํด๋ ๋ผ:
argocd app create nginx-app \
--repo https://github.com/your-username/your-repo.git \
--path my-app \
--dest-server https://kubernetes.default.svc \
--dest-namespace default \
--sync-policy automated \
--auto-prune \
--self-heal
์ฌ๊ธฐ์ ์ค์ํ ์ต์
๋ค:
โข --sync-policy automated: Git ๋ณ๊ฒฝ์ฌํญ ์๋ ๋๊ธฐํ
โข --auto-prune: Git์์ ์ญ์ ๋ ๋ฆฌ์์ค ์๋ ์ ๊ฑฐ
โข --self-heal: ํด๋ฌ์คํฐ์์ ์๋ ๋ณ๊ฒฝ ์ ์๋ ๋ณต๊ตฌ
Step 4: ๋ฐฐํฌ ์ํ ํ์ธ
ArgoCD UI์์ ์ ํ๋ฆฌ์ผ์ด์
์นด๋๋ฅผ ํด๋ฆญํ๋ฉด ๋ฉ์ง ์๊ฐํ ํ๋ฉด์ด ๋์! ๐
์ฌ๊ธฐ์ ๋ณผ ์ ์๋ ๊ฒ๋ค:
โข ๋ชจ๋ Kubernetes ๋ฆฌ์์ค์ ๊ด๊ณ๋
โข ๊ฐ ๋ฆฌ์์ค์ ํฌ์ค ์ํ (Healthy, Progressing, Degraded)
โข ๋๊ธฐํ ์ํ (Synced, OutOfSync)
โข ์ต๊ทผ ๋ฐฐํฌ ํ์คํ ๋ฆฌ
โข ์ค์๊ฐ ๋ก๊ทธ
CLI๋ก๋ ํ์ธ ๊ฐ๋ฅํด:
argocd app get nginx-app
๐ง ๊ณ ๊ธ ์ค์ ๊ณผ ๋ฒ ์คํธ ํ๋ํฐ์ค
๊ธฐ๋ณธ ๋ฐฐํฌ๋ ์ฑ๊ณตํ์ด! ์ด์ ์ค๋ฌด์์ ๊ผญ ํ์ํ ๊ณ ๊ธ ๊ธฐ๋ฅ๋ค์ ์์๋ณด์. ๐ช
1. ๋ฉํฐ ํ๊ฒฝ ๊ด๋ฆฌ (Kustomize ํ์ฉ)
๋ณดํต ๊ฐ๋ฐ, ์คํ
์ด์ง, ํ๋ก๋์
ํ๊ฒฝ์ด ๋ฐ๋ก ์์์? ๊ฐ ํ๊ฒฝ๋ง๋ค ์ค์ ์ด ์กฐ๊ธ์ฉ ๋ค๋ฅธ๋ฐ, ์ด๊ฑธ ์ด๋ป๊ฒ ๊ด๋ฆฌํ ๊น? ๐ค
Kustomize๋ฅผ ์ฌ์ฉํ๋ฉด ๋ฒ ์ด์ค ๋งค๋ํ์คํธ๋ฅผ ๊ณต์ ํ๋ฉด์ ํ๊ฒฝ๋ณ ์ฐจ์ด๋ง ์ค๋ฒ๋ ์ด๋ก ๊ด๋ฆฌํ ์ ์์ด!
my-app/
โโโ base/
โ โโโ kustomization.yaml
โ โโโ deployment.yaml
โ โโโ service.yaml
โโโ overlays/
โโโ dev/
โ โโโ kustomization.yaml
โ โโโ replica-patch.yaml
โโโ staging/
โ โโโ kustomization.yaml
โ โโโ replica-patch.yaml
โโโ prod/
โโโ kustomization.yaml
โโโ replica-patch.yaml
โโโ resource-patch.yaml
base/kustomization.yaml:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- deployment.yaml
- service.yaml
commonLabels:
app: nginx
overlays/prod/kustomization.yaml:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
bases:
- ../../base
patchesStrategicMerge:
- replica-patch.yaml
- resource-patch.yaml
namespace: production
commonLabels:
environment: prod
overlays/prod/replica-patch.yaml:
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-app
spec:
replicas: 10
์ด์ ArgoCD Application์ ํ๊ฒฝ๋ณ๋ก ๋ง๋ค ๋ path๋ง ๋ค๋ฅด๊ฒ ์ง์ ํ๋ฉด ๋ผ:
argocd app create nginx-prod \
--repo https://github.com/your-username/your-repo.git \
--path my-app/overlays/prod \
--dest-server https://kubernetes.default.svc \
--dest-namespace production
2. Helm ์ฐจํธ ํตํฉ
Helm ์ฐจํธ๋ฅผ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ๋ ๋ง์ง? ArgoCD๋ Helm๋ ์๋ฒฝํ๊ฒ ์ง์ํด! ๐ฉ
values.yaml์ Git์์ ๊ด๋ฆฌ:
argocd app create my-helm-app \
--repo https://charts.bitnami.com/bitnami \
--helm-chart nginx \
--revision 13.2.0 \
--values-literal-file values.yaml \
--dest-server https://kubernetes.default.svc \
--dest-namespace default
๋๋ Git ์ ์ฅ์์ ์๋ Helm ์ฐจํธ๋ฅผ ์ฌ์ฉํ ์๋ ์์ด:
my-helm-app/
โโโ Chart.yaml
โโโ values.yaml
โโโ values-dev.yaml
โโโ values-prod.yaml
โโโ templates/
โโโ deployment.yaml
โโโ service.yaml
ํ๊ฒฝ๋ณ๋ก ๋ค๋ฅธ values ํ์ผ์ ์ฌ์ฉํ๋ ค๋ฉด:
argocd app create my-helm-app-prod \
--repo https://github.com/your-username/your-repo.git \
--path my-helm-app \
--helm-set-file values=values-prod.yaml \
--dest-server https://kubernetes.default.svc \
--dest-namespace production
3. ๋๊ธฐํ ์ ์ฑ ์ธ๋ฐํ๊ฒ ์กฐ์ ํ๊ธฐ
์๋ ๋๊ธฐํ๋ ํธํ์ง๋ง, ํ๋ก๋์ ์์๋ ์ข ๋ ์ ์คํด์ผ ํ ๋๊ฐ ์์ด. ๋ค์ํ ๋๊ธฐํ ์ต์ ์ ์์๋ณด์! โ๏ธ
| ์ต์ | ์ค๋ช | ์ถ์ฒ ํ๊ฒฝ |
|---|---|---|
| Manual | ์๋์ผ๋ก๋ง ๋๊ธฐํ | ํ๋ก๋์ (์น์ธ ํ๋ก์ธ์ค ํ์) |
| Automatic | Git ๋ณ๊ฒฝ ์ ์๋ ๋๊ธฐํ | ๊ฐ๋ฐ, ์คํ ์ด์ง |
| Auto-Prune | Git์์ ์ญ์ ๋ ๋ฆฌ์์ค ์๋ ์ ๊ฑฐ | ๋ชจ๋ ํ๊ฒฝ (์ฃผ์ ํ์) |
| Self-Heal | ํด๋ฌ์คํฐ ๋ณ๊ฒฝ ์ Git ์ํ๋ก ๋ณต๊ตฌ | ํ๋ก๋์ (์ค์ ๋๋ฆฌํํธ ๋ฐฉ์ง) |
Application ๋งค๋ํ์คํธ๋ก ์ธ๋ฐํ๊ฒ ์ค์ :
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: nginx-app
namespace: argocd
spec:
project: default
source:
repoURL: https://github.com/your-username/your-repo.git
targetRevision: HEAD
path: my-app
destination:
server: https://kubernetes.default.svc
namespace: default
syncPolicy:
automated:
prune: true
selfHeal: true
allowEmpty: false
syncOptions:
- CreateNamespace=true
- PrunePropagationPolicy=foreground
- PruneLast=true
retry:
limit: 5
backoff:
duration: 5s
factor: 2
maxDuration: 3m
๐ ๋ณด์ ๊ฐํํ๊ธฐ
ArgoCD๋ ํด๋ฌ์คํฐ์ ํต์ฌ ์ธํ๋ผ๋ฅผ ๊ด๋ฆฌํ๋๊น ๋ณด์์ด ์ ๋ง ์ค์ํด! ์ค๋ฌด์์ ๊ผญ ์ ์ฉํด์ผ ํ ๋ณด์ ์ค์ ๋ค์ ์์๋ณด์. ๐
1. RBAC (์ญํ ๊ธฐ๋ฐ ์ ๊ทผ ์ ์ด)
ํ์๋ง๋ค ๋ค๋ฅธ ๊ถํ์ ์ค์ผ ํ ๋๊ฐ ์์ง? ArgoCD๋ ๊ฐ๋ ฅํ RBAC์ ์ง์ํด!
argocd-rbac-cm ConfigMap ์์ :
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-rbac-cm
namespace: argocd
data:
policy.default: role:readonly
policy.csv: |
# ๊ฐ๋ฐ์ ๊ทธ๋ฃน - dev ๋ค์์คํ์ด์ค๋ง ์ ๊ทผ
p, role:developer, applications, get, */*, allow
p, role:developer, applications, sync, dev/*, allow
g, dev-team, role:developer
# ์ด์ํ - ๋ชจ๋ ๊ถํ
p, role:operator, applications, *, */*, allow
p, role:operator, clusters, *, *, allow
p, role:operator, repositories, *, *, allow
g, ops-team, role:operator
# ์ฝ๊ธฐ ์ ์ฉ ์ฌ์ฉ์
p, role:readonly, applications, get, */*, allow
p, role:readonly, logs, get, */*, allow
g, viewer-team, role:readonly
์ด๋ ๊ฒ ์ค์ ํ๋ฉด:
โข ๊ฐ๋ฐ์๋ dev ๋ค์์คํ์ด์ค๋ง ๋ฐฐํฌ ๊ฐ๋ฅ โ
โข ์ด์ํ์ ๋ชจ๋ ๊ถํ ๋ณด์ โ
โข ๋ทฐ์ด๋ ์กฐํ๋ง ๊ฐ๋ฅ โ
2. SSO ํตํฉ (OIDC)
ํ์ฌ์์ Google Workspace๋ Okta๋ฅผ ์ด๋ค๋ฉด SSO๋ฅผ ์ฐ๋ํ๋ ๊ฒ ์ข์! ๐ซ
Google OAuth ์์ :
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
namespace: argocd
data:
url: https://argocd.yourdomain.com
oidc.config: |
name: Google
issuer: https://accounts.google.com
clientID: your-client-id.apps.googleusercontent.com
clientSecret: $oidc.google.clientSecret
requestedScopes:
- openid
- profile
- email
requestedIDTokenClaims:
groups:
essential: true
Secret์ ํด๋ผ์ด์ธํธ ์ํฌ๋ฆฟ ์ ์ฅ:
kubectl create secret generic argocd-secret \
-n argocd \
--from-literal=oidc.google.clientSecret=YOUR_CLIENT_SECRET
3. Private Git ์ ์ฅ์ ์ฐ๋
ํ์ฌ ์ฝ๋๋ ๋น์ฐํ Private ์ ์ฅ์์ ์๊ฒ ์ง? SSH ํค๋ Personal Access Token์ผ๋ก ์ฐ๋ํ ์ ์์ด! ๐
SSH ํค ๋ฐฉ์:
argocd repo add git@github.com:your-org/your-repo.git \
--ssh-private-key-path ~/.ssh/id_rsa
HTTPS + Token ๋ฐฉ์:
argocd repo add https://github.com/your-org/your-repo.git \
--username your-username \
--password ghp_yourpersonalaccesstoken
UI์์๋ Settings > Repositories์์ ์ถ๊ฐํ ์ ์์ด!
4. Secret ๊ด๋ฆฌ
๋ฐ์ดํฐ๋ฒ ์ด์ค ๋น๋ฐ๋ฒํธ ๊ฐ์ ๋ฏผ๊ฐํ ์ ๋ณด๋ Git์ ํ๋ฌธ์ผ๋ก ์ฌ๋ฆฌ๋ฉด ์ ๋์ง? ์ฌ๋ฌ ํด๊ฒฐ์ฑ
์ด ์์ด:
๋ฐฉ๋ฒ 1: Sealed Secrets
# Sealed Secrets ์ปจํธ๋กค๋ฌ ์ค์น
kubectl apply -f https://github.com/bitnami-labs/sealed-secrets/releases/download/v0.18.0/controller.yaml
# Secret์ SealedSecret์ผ๋ก ์ํธํ
kubeseal --format yaml < secret.yaml > sealed-secret.yaml
# ์ํธํ๋ ํ์ผ์ Git์ ์ปค๋ฐ
git add sealed-secret.yaml
git commit -m "Add sealed secret"
๋ฐฉ๋ฒ 2: External Secrets Operator
AWS Secrets Manager, HashiCorp Vault ๋ฑ ์ธ๋ถ ์ํฌ๋ฆฟ ์ ์ฅ์์ ์ฐ๋!
๋ฐฉ๋ฒ 3: SOPS (Mozilla์ ์ํธํ ๋๊ตฌ)
Git์ ์ํธํ๋ ํ์ผ์ ์ ์ฅํ๊ณ ArgoCD๊ฐ ์๋์ผ๋ก ๋ณตํธํ!
โข ArgoCD admin ๋น๋ฐ๋ฒํธ๋ ์ค์น ํ ์ฆ์ ๋ณ๊ฒฝํด
โข ํ๋ก๋์ ์์๋ ๋ฐ๋์ TLS/HTTPS ์ฌ์ฉ
โข ์ ๊ธฐ์ ์ผ๋ก ์ ๊ทผ ๋ก๊ทธ๋ฅผ ๊ฒํ ํด
โข ์ต์ ๊ถํ ์์น์ ์ ์ฉํด (Principle of Least Privilege)
๐ ๋ชจ๋ํฐ๋ง๊ณผ ์๋ฆผ ์ค์
๋ฐฐํฌ๊ฐ ์คํจํ๊ฑฐ๋ ์ ํ๋ฆฌ์ผ์ด์ ์ด Unhealthy ์ํ๊ฐ ๋๋ฉด ์ฆ์ ์์์ผ๊ฒ ์ง? ArgoCD์ ๋ชจ๋ํฐ๋ง๊ณผ ์๋ฆผ ๊ธฐ๋ฅ์ ํ์ฉํด๋ณด์! ๐ข
1. Prometheus ๋ฉํธ๋ฆญ ์์ง
ArgoCD๋ ๊ธฐ๋ณธ์ ์ผ๋ก Prometheus ๋ฉํธ๋ฆญ์ ๋ ธ์ถํด. ์ด๊ฑธ ์์งํด์ Grafana๋ก ์๊ฐํํ๋ฉด ์๋ฒฝ! ๐
apiVersion: v1
kind: Service
metadata:
name: argocd-metrics
namespace: argocd
labels:
app.kubernetes.io/name: argocd-metrics
spec:
ports:
- name: metrics
port: 8082
protocol: TCP
targetPort: 8082
selector:
app.kubernetes.io/name: argocd-application-controller
Prometheus ServiceMonitor ์ค์ :
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: argocd-metrics
namespace: argocd
spec:
selector:
matchLabels:
app.kubernetes.io/name: argocd-metrics
endpoints:
- port: metrics
interval: 30s
์ฃผ์ ๋ฉํธ๋ฆญ๋ค:
โข argocd_app_info: ์ ํ๋ฆฌ์ผ์ด์
์ ๋ณด
โข argocd_app_sync_total: ๋๊ธฐํ ํ์
โข argocd_app_health_status: ํฌ์ค ์ํ
โข argocd_app_sync_status: ๋๊ธฐํ ์ํ
2. Slack ์๋ฆผ ์ค์
๋ฐฐํฌ ์คํจ๋ ์ํ ๋ณ๊ฒฝ์ Slack์ผ๋ก ๋ฐ์๋ณด์! ๐ฌ
argocd-notifications-cm ConfigMap ์ค์ :
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-notifications-cm
namespace: argocd
data:
service.slack: |
token: $slack-token
template.app-deployed: |
message: |
Application {{.app.metadata.name}} is now running new version.
slack:
attachments: |
[{
"title": "{{ .app.metadata.name}}",
"title_link":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}",
"color": "#18be52",
"fields": [
{
"title": "Sync Status",
"value": "{{.app.status.sync.status}}",
"short": true
},
{
"title": "Repository",
"value": "{{.app.spec.source.repoURL}}",
"short": true
}
]
}]
template.app-health-degraded: |
message: |
Application {{.app.metadata.name}} has degraded.
slack:
attachments: |
[{
"title": "{{ .app.metadata.name}}",
"title_link": "{{.context.argocdUrl}}/applications/{{.app.metadata.name}}",
"color": "#f4c030",
"fields": [
{
"title": "Health Status",
"value": "{{.app.status.health.status}}",
"short": true
}
]
}]
trigger.on-deployed: |
- when: app.status.operationState.phase in ['Succeeded']
send: [app-deployed]
trigger.on-health-degraded: |
- when: app.status.health.status == 'Degraded'
send: [app-health-degraded]
Slack ํ ํฐ์ Secret์ ์ ์ฅ:
kubectl create secret generic argocd-notifications-secret \
-n argocd \
--from-literal=slack-token=xoxb-your-slack-bot-token
Application์ ์๋ฆผ ์ค์ ์ถ๊ฐ:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: nginx-app
namespace: argocd
annotations:
notifications.argoproj.io/subscribe.on-deployed.slack: your-channel
notifications.argoproj.io/subscribe.on-health-degraded.slack: your-channel
spec:
# ... ๋๋จธ์ง ์ค์
3. ์ปค์คํ ํฌ์ค ์ฒดํฌ
๊ธฐ๋ณธ ํฌ์ค ์ฒดํฌ๋ก๋ ๋ถ์กฑํ ๋๊ฐ ์์ด. ์ปค์คํ ํฌ์ค ์ฒดํฌ๋ฅผ ์ ์ํ ์ ์์ด! ๐ฅ
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
namespace: argocd
data:
resource.customizations: |
argoproj.io/Rollout:
health.lua: |
hs = {}
if obj.status ~= nil then
if obj.status.phase == "Healthy" then
hs.status = "Healthy"
hs.message = "Rollout is healthy"
return hs
end
if obj.status.phase == "Degraded" then
hs.status = "Degraded"
hs.message = "Rollout is degraded"
return hs
end
end
hs.status = "Progressing"
hs.message = "Waiting for rollout to finish"
return hs
๐ CI/CD ํ์ดํ๋ผ์ธ ํตํฉ
ArgoCD๋ CD(Continuous Deployment) ๋ถ๋ถ์ ๋ด๋นํด. ๊ทธ๋ผ CI(Continuous Integration)๋? Jenkins, GitLab CI, GitHub Actions ๊ฐ์ CI ๋๊ตฌ์ ํตํฉํด์ผ์ง! ๐
GitHub Actions ํตํฉ ์์
์ฝ๋๊ฐ ํธ์๋๋ฉด ์๋์ผ๋ก ๋น๋ํ๊ณ , ์ด๋ฏธ์ง๋ฅผ ๋ง๋ค๊ณ , ๋งค๋ํ์คํธ๋ฅผ ์ ๋ฐ์ดํธํ๋ ์ํฌํ๋ก์ฐ๋ฅผ ๋ง๋ค์ด๋ณด์!
name: CI/CD Pipeline
on:
push:
branches: [ main ]
env:
DOCKER_REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.DOCKER_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,prefix={{branch}}-
type=ref,event=branch
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Update Kubernetes manifests
run: |
IMAGE_TAG=$(echo ${{ github.sha }} | cut -c1-7)
sed -i "s|image:.*|image: ${{ env.DOCKER_REGISTRY }}/${{ env.IMAGE_NAME }}:main-${IMAGE_TAG}|g" k8s/deployment.yaml
- name: Commit and push changes
run: |
git config --global user.name 'GitHub Actions'
git config --global user.email 'actions@github.com'
git add k8s/deployment.yaml
git commit -m "Update image to ${{ github.sha }}"
git push
์ด ์ํฌํ๋ก์ฐ๋:
1. ์ฝ๋๋ฅผ ์ฒดํฌ์์ํด ๐ฅ
2. Docker ์ด๋ฏธ์ง๋ฅผ ๋น๋ํ๊ณ ๋ ์ง์คํธ๋ฆฌ์ ํธ์ํด ๐ณ
3. Kubernetes ๋งค๋ํ์คํธ์ ์ด๋ฏธ์ง ํ๊ทธ๋ฅผ ์
๋ฐ์ดํธํด โ๏ธ
4. ๋ณ๊ฒฝ์ฌํญ์ Git์ ์ปค๋ฐํด ๐ค
5. ArgoCD๊ฐ ์๋์ผ๋ก ๊ฐ์งํ๊ณ ๋ฐฐํฌํด! ๐
Image Updater ์ฌ์ฉํ๊ธฐ
๋งค๋ฒ ๋งค๋ํ์คํธ๋ฅผ ์๋์ผ๋ก ์
๋ฐ์ดํธํ๊ธฐ ๊ท์ฐฎ๋ค๋ฉด? ArgoCD Image Updater๋ฅผ ์ฌ์ฉํด! ๐ค
์ค์น:
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj-labs/argocd-image-updater/stable/manifests/install.yaml
Application์ ์ด๋ ธํ ์ด์ ์ถ๊ฐ:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: nginx-app
namespace: argocd
annotations:
argocd-image-updater.argoproj.io/image-list: nginx=nginx
argocd-image-updater.argoproj.io/nginx.update-strategy: latest
argocd-image-updater.argoproj.io/write-back-method: git
spec:
# ... ๋๋จธ์ง ์ค์
์ด์ ์ ์ด๋ฏธ์ง๊ฐ ๋ ์ง์คํธ๋ฆฌ์ ํธ์๋๋ฉด ์๋์ผ๋ก ๊ฐ์งํ๊ณ ๋ฐฐํฌํด! ์์ ์๋ํ! ๐
๐ ํธ๋ฌ๋ธ์ํ ๊ฐ์ด๋
์ค๋ฌด์์ ์์ฃผ ๋ง์ฃผ์น๋ ๋ฌธ์ ๋ค๊ณผ ํด๊ฒฐ ๋ฐฉ๋ฒ์ ์ ๋ฆฌํด๋ดค์ด! ์ด๊ฑฐ ์์๋๋ฉด ์ฝ์ง ์๊ฐ์ ์์ฒญ ์ค์ผ ์ ์์ด. ๐
๋ฌธ์ 1: Application์ด OutOfSync ์ํ์์ ๋ฉ์ถค
์ฆ์: Git์ ๋ณ๊ฒฝ์ฌํญ์ ํธ์ํ๋๋ฐ ArgoCD๊ฐ ๊ฐ์ง๋ฅผ ๋ชป ํด.
์์ธ:
โข Git ์ ์ฅ์ ์ฐ๊ฒฐ ๋ฌธ์
โข Webhook ์ค์ ๋๋ฝ
โข ํด๋ง ์ฃผ๊ธฐ๊ฐ ๋๋ฌด ๊ธธ์ด์
ํด๊ฒฐ ๋ฐฉ๋ฒ:
# 1. ์ ์ฅ์ ์ฐ๊ฒฐ ํ์ธ
argocd repo list
# 2. ์๋์ผ๋ก ๋ฆฌํ๋ ์
argocd app get nginx-app --refresh
# 3. Webhook ์ค์ ํ์ธ (GitHub ์์ )
# Settings > Webhooks์์ ๋ค์ URL ์ถ๊ฐ:
# https://argocd.yourdomain.com/api/webhook
# 4. ํด๋ง ์ฃผ๊ธฐ ์กฐ์ (argocd-cm ConfigMap)
data:
timeout.reconciliation: 60s # ๊ธฐ๋ณธ๊ฐ์ 180s
๋ฌธ์ 2: Sync ์คํจ - "resource already exists"
์ฆ์: ๋๊ธฐํ ์๋ ์ ๋ฆฌ์์ค๊ฐ ์ด๋ฏธ ์กด์ฌํ๋ค๋ ์๋ฌ
์์ธ: kubectl๋ก ์ง์ ์์ฑํ ๋ฆฌ์์ค์ ์ถฉ๋
ํด๊ฒฐ ๋ฐฉ๋ฒ:
# 1. ๊ธฐ์กด ๋ฆฌ์์ค ์ญ์
kubectl delete deployment nginx-app -n default
# 2. ๋๋ ArgoCD๊ฐ ๊ด๋ฆฌํ๋๋ก ์ค์
kubectl label deployment nginx-app -n default \
app.kubernetes.io/instance=nginx-app
# 3. Application์ force sync ์ต์
์ถ๊ฐ
argocd app sync nginx-app --force
๋ฌธ์ 3: ํฌ์ค ์ฒดํฌ ์คํจ - Progressing ์ํ ์ง์
์ฆ์: ๋ฐฐํฌ๋ ์ฑ๊ณตํ๋๋ฐ ๊ณ์ Progressing ์ํ
์์ธ:
โข Pod๊ฐ Ready ์ํ๊ฐ ์ ๋จ
โข Readiness Probe ์คํจ
โข ์ด๋ฏธ์ง Pull ์คํจ
ํด๊ฒฐ ๋ฐฉ๋ฒ:
# 1. Pod ์ํ ํ์ธ
kubectl get pods -n default
kubectl describe pod <pod-name> -n default
# 2. ๋ก๊ทธ ํ์ธ
kubectl logs <pod-name> -n default
# 3. ์ด๋ฒคํธ ํ์ธ
kubectl get events -n default --sort-by='.lastTimestamp'
# 4. ArgoCD์์ ๋ฆฌ์์ค ์์ธ ๋ณด๊ธฐ
argocd app resources nginx-app
๋ฌธ์ 4: Private ์ ์ฅ์ ์ธ์ฆ ์คํจ
์ฆ์: "authentication failed" ๋๋ "repository not found"
ํด๊ฒฐ ๋ฐฉ๋ฒ:
# SSH ํค ๊ถํ ํ์ธ
chmod 600 ~/.ssh/id_rsa
# Personal Access Token ๊ถํ ํ์ธ
# GitHub: repo ์ ์ฒด ๊ถํ ํ์
# GitLab: read_repository ๊ถํ ํ์
# ์ ์ฅ์ ์ฌ๋ฑ๋ก
argocd repo rm git@github.com:your-org/your-repo.git
argocd repo add git@github.com:your-org/your-repo.git \
--ssh-private-key-path ~/.ssh/id_rsa
# ์ฐ๊ฒฐ ํ
์คํธ
argocd repo get git@github.com:your-org/your-repo.git
๋ฌธ์ 5: ๋ฉ๋ชจ๋ฆฌ ๋ถ์กฑ์ผ๋ก ArgoCD Pod ์ฌ์์
์ฆ์: argocd-application-controller๊ฐ OOMKilled
์์ธ: ๊ด๋ฆฌํ๋ ์ ํ๋ฆฌ์ผ์ด์
์ด ๋๋ฌด ๋ง๊ฑฐ๋ ํฐ ๋งค๋ํ์คํธ
ํด๊ฒฐ ๋ฐฉ๋ฒ:
# argocd-application-controller์ ๋ฆฌ์์ค ์ฆ๊ฐ
kubectl edit deployment argocd-application-controller -n argocd
# resources ์น์
์์ :
resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "2Gi"
cpu: "1000m"
# ๋๋ ์ค๋ฉ ์ค์ (๋๊ท๋ชจ ํ๊ฒฝ)
# argocd-cmd-params-cm ConfigMap์ ์ถ๊ฐ:
data:
application.controller.replicas: "3"
๐ ์ค์ ์๋๋ฆฌ์ค: ๋ง์ดํฌ๋ก์๋น์ค ๋ฐฐํฌ
์ด๋ก ์ ์ถฉ๋ถํ ๋ฐฐ์ ์ผ๋, ์ค์ ๋ง์ดํฌ๋ก์๋น์ค ์ํคํ
์ฒ๋ฅผ ArgoCD๋ก ๋ฐฐํฌํ๋ ์๋๋ฆฌ์ค๋ฅผ ์ดํด๋ณด์! ๐๏ธ
๊ฐ์์ ์ผํ๋ชฐ ์๋น์ค๋ฅผ ์๋ก ๋ค๊ฒ:
ํ๋ก์ ํธ ๊ตฌ์กฐ
shopping-mall/
โโโ apps/
โ โโโ api-gateway/
โ โ โโโ base/
โ โ โ โโโ kustomization.yaml
โ โ โ โโโ deployment.yaml
โ โ โ โโโ service.yaml
โ โ โโโ overlays/
โ โ โโโ dev/
โ โ โโโ staging/
โ โ โโโ prod/
โ โโโ user-service/
โ โ โโโ ... (๋์ผ ๊ตฌ์กฐ)
โ โโโ product-service/
โ โ โโโ ... (๋์ผ ๊ตฌ์กฐ)
โ โโโ order-service/
โ โโโ ... (๋์ผ ๊ตฌ์กฐ)
โโโ infrastructure/
โ โโโ postgres/
โ โโโ mongodb/
โ โโโ redis/
โ โโโ rabbitmq/
โโโ argocd/
โโโ projects/
โ โโโ shopping-mall-project.yaml
โโโ applications/
โโโ api-gateway.yaml
โโโ user-service.yaml
โโโ product-service.yaml
โโโ order-service.yaml
ArgoCD Project ์ ์
๋จผ์ ํ๋ก์ ํธ๋ฅผ ๋ง๋ค์ด์ ๋ฆฌ์์ค๋ฅผ ๋ ผ๋ฆฌ์ ์ผ๋ก ๊ทธ๋ฃนํํ์:
apiVersion: argoproj.io/v1alpha1
kind: AppProject
metadata:
name: shopping-mall
namespace: argocd
spec:
description: Shopping Mall Microservices
# ๋ฐฐํฌ ๊ฐ๋ฅํ ๋ค์์คํ์ด์ค ์ ํ
destinations:
- namespace: 'shopping-mall-*'
server: https://kubernetes.default.svc
# ์ฌ์ฉ ๊ฐ๋ฅํ Git ์ ์ฅ์
sourceRepos:
- 'https://github.com/your-org/shopping-mall.git'
# ๋ฐฐํฌ ๊ฐ๋ฅํ ๋ฆฌ์์ค ํ์
clusterResourceWhitelist:
- group: ''
kind: Namespace
- group: 'rbac.authorization.k8s.io'
kind: ClusterRole
- group: 'rbac.authorization.k8s.io'
kind: ClusterRoleBinding
# ๋ค์์คํ์ด์ค ๋ฆฌ์์ค๋ ๋ชจ๋ ํ์ฉ
namespaceResourceWhitelist:
- group: '*'
kind: '*'
# RBAC ์ค์
roles:
- name: developer
description: Developers can view and sync
policies:
- p, proj:shopping-mall:developer, applications, get, shopping-mall/*, allow
- p, proj:shopping-mall:developer, applications, sync, shopping-mall/*, allow
groups:
- dev-team
- name: operator
description: Operators have full access
policies:
- p, proj:shopping-mall:operator, applications, *, shopping-mall/*, allow
groups:
- ops-team
Application of Applications ํจํด
์ฌ๋ฌ ๋ง์ดํฌ๋ก์๋น์ค๋ฅผ ํ ๋ฒ์ ๊ด๋ฆฌํ๋ ค๋ฉด "App of Apps" ํจํด์ ์ฌ์ฉํด! ๐ฏ
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: shopping-mall-apps
namespace: argocd
spec:
project: shopping-mall
source:
repoURL: https://github.com/your-org/shopping-mall.git
targetRevision: HEAD
path: argocd/applications
destination:
server: https://kubernetes.default.svc
namespace: argocd
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
์ด์ argocd/applications/ ๋๋ ํ ๋ฆฌ์ ๊ฐ ์๋น์ค์ Application ๋งค๋ํ์คํธ๋ฅผ ๋ฃ์ผ๋ฉด ์๋์ผ๋ก ์์ฑ๋ผ!
๊ฐ๋ณ ์๋น์ค Application ์์
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: user-service-prod
namespace: argocd
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: shopping-mall
source:
repoURL: https://github.com/your-org/shopping-mall.git
targetRevision: HEAD
path: apps/user-service/overlays/prod
destination:
server: https://kubernetes.default.svc
namespace: shopping-mall-prod
syncPolicy:
automated:
prune: false # ํ๋ก๋์
์ ์๋ ์ญ์
selfHeal: true
syncOptions:
- CreateNamespace=true
retry:
limit: 5
backoff:
duration: 5s
factor: 2
maxDuration: 3m
ignoreDifferences:
- group: apps
kind: Deployment
jsonPointers:
- /spec/replicas # HPA๊ฐ ๊ด๋ฆฌํ๋ฏ๋ก ๋ฌด์
์๋น์ค ๊ฐ ์์กด์ฑ ๊ด๋ฆฌ
์๋น์ค ๋ฐฐํฌ ์์๊ฐ ์ค์ํ ๋๊ฐ ์์ง? Sync Waves๋ฅผ ์ฌ์ฉํ๋ฉด ์์๋ฅผ ์ ์ดํ ์ ์์ด! ๐
# infrastructure/postgres/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres
annotations:
argocd.argoproj.io/sync-wave: "0" # ๊ฐ์ฅ ๋จผ์ ๋ฐฐํฌ
spec:
# ...
# apps/user-service/base/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: user-service
annotations:
argocd.argoproj.io/sync-wave: "1" # DB ๋ค์์ ๋ฐฐํฌ
spec:
# ...
# apps/api-gateway/base/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: api-gateway
annotations:
argocd.argoproj.io/sync-wave: "2" # ๋ง์ง๋ง์ ๋ฐฐํฌ
spec:
# ...
Sync Wave ๋ฒํธ๊ฐ ๋ฎ์์๋ก ๋จผ์ ๋ฐฐํฌ๋ผ. ๊ฐ์ ๋ฒํธ๋ ๋ณ๋ ฌ๋ก ๋ฐฐํฌ๋๊ณ ! ๐
๐ ๊ณ ๊ธ ๊ธฐ๋ฅ: Progressive Delivery
์นด๋๋ฆฌ ๋ฐฐํฌ๋ ๋ธ๋ฃจ-๊ทธ๋ฆฐ ๋ฐฐํฌ ๊ฐ์ ๊ณ ๊ธ ๋ฐฐํฌ ์ ๋ต์ ์ฌ์ฉํ๊ณ ์ถ๋ค๋ฉด? Argo Rollouts๋ฅผ ํจ๊ป ์ฌ์ฉํ๋ฉด ๋ผ! ๐ข
Argo Rollouts ์ค์น
kubectl create namespace argo-rollouts
kubectl apply -n argo-rollouts -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml
์นด๋๋ฆฌ ๋ฐฐํฌ ์์
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: user-service
spec:
replicas: 10
strategy:
canary:
steps:
- setWeight: 10 # 10%์ ํธ๋ํฝ์ ์ ๋ฒ์ ์ผ๋ก
- pause: {duration: 5m} # 5๋ถ ๋๊ธฐ
- setWeight: 30
- pause: {duration: 5m}
- setWeight: 50
- pause: {duration: 5m}
- setWeight: 80
- pause: {duration: 5m}
# ๋ฌธ์ ์์ผ๋ฉด 100% ์ ํ
# ์๋ ๋กค๋ฐฑ ์ค์
analysis:
templates:
- templateName: success-rate
startingStep: 2
args:
- name: service-name
value: user-service
# ํธ๋ํฝ ๋ผ์ฐํ
(Istio ์ฌ์ฉ ์)
trafficRouting:
istio:
virtualService:
name: user-service
routes:
- primary
selector:
matchLabels:
app: user-service
template:
metadata:
labels:
app: user-service
spec:
containers:
- name: user-service
image: your-registry/user-service:v2.0.0
ports:
- containerPort: 8080
๋ถ์ ํ ํ๋ฆฟ (์๋ ๋กค๋ฐฑ ์กฐ๊ฑด)
apiVersion: argoproj.io/v1alpha1
kind: AnalysisTemplate
metadata:
name: success-rate
spec:
args:
- name: service-name
metrics:
- name: success-rate
interval: 1m
successCondition: result[0] >= 0.95
failureLimit: 3
provider:
prometheus:
address: http://prometheus.monitoring:9090
query: |
sum(rate(
http_requests_total{
service="{{args.service-name}}",
status=~"2.."
}[5m]
)) /
sum(rate(
http_requests_total{
service="{{args.service-name}}"
}[5m]
))
์ด๋ ๊ฒ ์ค์ ํ๋ฉด:
โข ์ ๋ฒ์ ์ ์ ์ง์ ์ผ๋ก ๋ฐฐํฌํด ๐ฃ
โข ๊ฐ ๋จ๊ณ๋ง๋ค ์ฑ๊ณต๋ฅ ์ ์ฒดํฌํด ๐
โข ์ฑ๊ณต๋ฅ ์ด 95% ๋ฏธ๋ง์ด๋ฉด ์๋ ๋กค๋ฐฑ! ๐
โข ๋ฌธ์ ์์ผ๋ฉด ์๋์ผ๋ก 100% ์ ํ! โ
๋ธ๋ฃจ-๊ทธ๋ฆฐ ๋ฐฐํฌ
apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
name: product-service
spec:
replicas: 5
strategy:
blueGreen:
activeService: product-service-active
previewService: product-service-preview
autoPromotionEnabled: false # ์๋ ์น์ธ
scaleDownDelaySeconds: 300 # ์ด์ ๋ฒ์ 5๋ถ ํ ์ญ์
selector:
matchLabels:
app: product-service
template:
metadata:
labels:
app: product-service
spec:
containers:
- name: product-service
image: your-registry/product-service:v2.0.0
ports:
- containerPort: 8080
๋ธ๋ฃจ-๊ทธ๋ฆฐ ๋ฐฐํฌ๋:
โข ์ ๋ฒ์ (Green)์ ์์ ํ ๋ฐฐํฌํ ํ ๐ข
โข ํ๋ฆฌ๋ทฐ ์๋น์ค๋ก ํ
์คํธํ๊ณ ๐งช
โข ๋ฌธ์ ์์ผ๋ฉด ํธ๋ํฝ์ ํ ๋ฒ์ ์ ํํด ๐
โข ์ด์ ๋ฒ์ (Blue)์ ์ผ์ ์๊ฐ ์ ์ง ํ ์ญ์ ๐ต
๋ธ๋ฃจ-๊ทธ๋ฆฐ ๋ฐฐํฌ: ๋น ๋ฅธ ๋กค๋ฐฑ์ด ์ค์ํ ๋. ์ฆ์ ์ด์ ๋ฒ์ ์ผ๋ก ๋ณต๊ตฌ ๊ฐ๋ฅ! ๐ต๐ข
์ผ๋ฐ Rolling Update: ๊ฐ๋จํ ์ ํ๋ฆฌ์ผ์ด์ , ๋ค์ดํ์ ํ์ฉ ๊ฐ๋ฅํ ๋ ๐ฆ
๐ ์ฑ๋ฅ ์ต์ ํ ํ
ArgoCD๋ฅผ ๋๊ท๋ชจ๋ก ์ด์ํ ๋ ์ฑ๋ฅ ์ต์ ํ๊ฐ ์ค์ํด! ์ค์ ํ๋ค์ ๊ณต์ ํ ๊ฒ. ๐
1. ๋ฆฌ์์ค ์ ํ ์กฐ์
์ ํ๋ฆฌ์ผ์ด์ ์ด ๋ง์์ง๋ฉด ArgoCD ์ปดํฌ๋ํธ์ ๋ฆฌ์์ค๋ฅผ ๋๋ ค์ค์ผ ํด:
# argocd-application-controller
resources:
requests:
memory: "2Gi"
cpu: "1000m"
limits:
memory: "4Gi"
cpu: "2000m"
# argocd-repo-server
resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "2Gi"
cpu: "1000m"
2. ๋๊ธฐํ ์ฃผ๊ธฐ ์ต์ ํ
๋ถํ์ํ๊ฒ ์์ฃผ ๋๊ธฐํํ๋ฉด ๋ฆฌ์์ค ๋ญ๋น์ผ:
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
namespace: argocd
data:
# ๊ธฐ๋ณธ 3๋ถ์์ 5๋ถ์ผ๋ก ์ฆ๊ฐ
timeout.reconciliation: 300s
# Git ํด๋ง ์ฃผ๊ธฐ (Webhook ์ฌ์ฉ ์ ๊ธธ๊ฒ ์ค์ )
timeout.reconciliation.jitter: 30s
3. ๋ฆฌ์์ค ์ ์ธ ์ค์
์์ฃผ ๋ณ๊ฒฝ๋๋ ๋ฆฌ์์ค๋ ArgoCD๊ฐ ๋ฌด์ํ๋๋ก ์ค์ :
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
namespace: argocd
data:
resource.exclusions: |
- apiGroups:
- "*"
kinds:
- Event
- Pod
clusters:
- "*"
# HPA๊ฐ ๊ด๋ฆฌํ๋ replicas ๋ฌด์
resource.compareoptions: |
ignoreAggregatedRoles: true
ignoreResourceStatusField: all
4. ์ค๋ฉ (Sharding) ์ค์
์ ํ๋ฆฌ์ผ์ด์ ์ด 100๊ฐ ์ด์์ด๋ฉด ์ปจํธ๋กค๋ฌ๋ฅผ ์ฌ๋ฌ ๊ฐ๋ก ๋ถ์ฐ:
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cmd-params-cm
namespace: argocd
data:
# 3๊ฐ์ ์ค๋๋ก ๋ถ์ฐ
application.controller.replicas: "3"
# ๊ฐ ์ค๋๊ฐ ์ฒ๋ฆฌํ ์ ํ๋ฆฌ์ผ์ด์
์
application.controller.shard.replicas: "3"
5. Redis ์บ์ ์ต์ ํ
Git ์ ์ฅ์ ์บ์๋ฅผ ๋๋ ค์ ์ฑ๋ฅ ํฅ์:
apiVersion: v1
kind: ConfigMap
metadata:
name: argocd-cm
namespace: argocd
data:
# ์บ์ ํฌ๊ธฐ ์ฆ๊ฐ (๊ธฐ๋ณธ 1GB)
repository.credentials.cache.expiration: 24h
# Redis ๋ฉ๋ชจ๋ฆฌ ์ฆ๊ฐ
redis.max.memory: 2gb
redis.max.memory.policy: allkeys-lru
๐ ๋ฉํฐ ํด๋ฌ์คํฐ ๊ด๋ฆฌ
์ฌ๋ฌ Kubernetes ํด๋ฌ์คํฐ๋ฅผ ๊ด๋ฆฌํด์ผ ํ๋ค๋ฉด? ArgoCD ํ๋๋ก ๋ชจ๋ ๊ด๋ฆฌํ ์ ์์ด! ๐
ํด๋ฌ์คํฐ ์ถ๊ฐํ๊ธฐ
# kubeconfig ์ปจํ
์คํธ ํ์ธ
kubectl config get-contexts
# ์ ํด๋ฌ์คํฐ ์ถ๊ฐ
argocd cluster add prod-cluster-context \
--name prod-cluster \
--server https://prod-k8s-api.example.com
# ํด๋ฌ์คํฐ ๋ชฉ๋ก ํ์ธ
argocd cluster list
ํด๋ฌ์คํฐ๋ณ Application ๋ฐฐํฌ
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: user-service-prod-us
namespace: argocd
spec:
project: shopping-mall
source:
repoURL: https://github.com/your-org/shopping-mall.git
targetRevision: HEAD
path: apps/user-service/overlays/prod
destination:
# ๋ฏธ๊ตญ ํด๋ฌ์คํฐ
server: https://prod-us-k8s-api.example.com
namespace: shopping-mall-prod
syncPolicy:
automated:
selfHeal: true
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: user-service-prod-eu
namespace: argocd
spec:
project: shopping-mall
source:
repoURL: https://github.com/your-org/shopping-mall.git
targetRevision: HEAD
path: apps/user-service/overlays/prod
destination:
# ์ ๋ฝ ํด๋ฌ์คํฐ
server: https://prod-eu-k8s-api.example.com
namespace: shopping-mall-prod
syncPolicy:
automated:
selfHeal: true
ApplicationSet์ผ๋ก ์๋ํ
์ฌ๋ฌ ํด๋ฌ์คํฐ์ ๋์ผํ ์ ํ๋ฆฌ์ผ์ด์ ์ ๋ฐฐํฌํ ๋๋ ApplicationSet์ ์ฌ์ฉํ๋ฉด ํธํด! ๐ฏ
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: user-service-global
namespace: argocd
spec:
generators:
- list:
elements:
- cluster: prod-us
url: https://prod-us-k8s-api.example.com
region: us-east-1
- cluster: prod-eu
url: https://prod-eu-k8s-api.example.com
region: eu-west-1
- cluster: prod-asia
url: https://prod-asia-k8s-api.example.com
region: ap-northeast-2
template:
metadata:
name: 'user-service-{{cluster}}'
spec:
project: shopping-mall
source:
repoURL: https://github.com/your-org/shopping-mall.git
targetRevision: HEAD
path: apps/user-service/overlays/prod
helm:
parameters:
- name: region
value: '{{region}}'
destination:
server: '{{url}}'
namespace: shopping-mall-prod
syncPolicy:
automated:
selfHeal: true
์ด๋ ๊ฒ ํ๋ฉด ํด๋ฌ์คํฐ๋ฅผ ์ถ๊ฐํ ๋๋ง๋ค ์๋์ผ๋ก ์ ํ๋ฆฌ์ผ์ด์ ์ด ์์ฑ๋ผ! ์์ ์๋ํ! ๐ค
๐ ๋ง๋ฌด๋ฆฌํ๋ฉฐ
์! ์ฌ๊ธฐ๊น์ง ์ฝ์๋ค๋ฉด ์ ๋ง ๋๋จํด! ๐
ArgoCD๋ฅผ ์ฌ์ฉํ GitOps ๋ฐฐํฌ ์๋ํ์ ๋ํด ์ ๋ง ๋ง์ ๊ฑธ ๋ค๋ค์ด:
โ
GitOps์ ๊ฐ๋
๊ณผ ArgoCD์ ์ฅ์
โ
์ค์น๋ถํฐ ์ฒซ ๋ฐฐํฌ๊น์ง ๋จ๊ณ๋ณ ๊ฐ์ด๋
โ
๋ฉํฐ ํ๊ฒฝ ๊ด๋ฆฌ์ Kustomize/Helm ํตํฉ
โ
๋ณด์ ๊ฐํ์ RBAC ์ค์
โ
๋ชจ๋ํฐ๋ง๊ณผ ์๋ฆผ ์์คํ
๊ตฌ์ถ
โ
CI/CD ํ์ดํ๋ผ์ธ ํตํฉ
โ
ํธ๋ฌ๋ธ์ํ
๊ฐ์ด๋
โ
์ค์ ๋ง์ดํฌ๋ก์๋น์ค ๋ฐฐํฌ ์๋๋ฆฌ์ค
โ
Progressive Delivery์ ๊ณ ๊ธ ๋ฐฐํฌ ์ ๋ต
โ
์ฑ๋ฅ ์ต์ ํ์ ๋ฉํฐ ํด๋ฌ์คํฐ ๊ด๋ฆฌ
์ด์ ๋๋ ArgoCD ์ ๋ฌธ๊ฐ๊ฐ ๋ ๊ฑฐ์ผ! ๐
์ค๋ฌด์์ ArgoCD๋ฅผ ๋์
ํ๋ฉด:
โข ๋ฐฐํฌ ์๊ฐ์ด ํ๊ธฐ์ ์ผ๋ก ์ค์ด๋ค์ด โฑ๏ธ
โข ๋ฐฐํฌ ํ์คํ ๋ฆฌ๊ฐ Git์ ๋ชจ๋ ๊ธฐ๋ก๋ผ ๐
โข ๋กค๋ฐฑ์ด ํด๋ฆญ ํ ๋ฒ์ผ๋ก ๊ฐ๋ฅํด ๐
โข ํ์๋ค๊ณผ ํ์
์ด ํจ์ฌ ์์ํด์ ธ ๐ค
โข ์ฌํด ๋ณต๊ตฌ๊ฐ ๊ฐ๋จํด์ ธ ๐ก๏ธ
ํน์ ArgoCD ๊ตฌ์ถ์ด๋ GitOps ์ ํ์ด ๋ง๋งํ๋ค๋ฉด, ์ฌ๋ฅ๋ท์์ DevOps ์ ๋ฌธ๊ฐ์ ๋์์ ๋ฐ์๋ณด๋ ๊ฒ๋ ์ข์ ๋ฐฉ๋ฒ์ด์ผ! ์ค๋ฌด ๊ฒฝํ์ด ํ๋ถํ ์ ๋ฌธ๊ฐ๋ค์ด ํ๋ก์ ํธ์ ๋ง๋ ์ต์ ์ ์๋ฃจ์
์ ์ ์ํด์ค ์ ์๊ฑฐ๋ . ๐ผ
์, ์ด์ ์ค์ ์ ์ ์ฉํด๋ณผ ์๊ฐ์ด์ผ! ์์ ํ๋ก์ ํธ๋ถํฐ ์์ํด์ ์ ์ฐจ ํ์ฅํด๋๊ฐ๋ฉด ๋ผ. ์ฒ์์ ์ด๋ ค์ ๋ณด์ฌ๋ ํ ๋ฒ ์ต์ํด์ง๋ฉด ArgoCD ์์ด๋ ๋ชป ์ด๊ฒ ๋ ๊ฑฐ์ผ! ๐
๊ถ๊ธํ ์ ์ด ์๊ฑฐ๋ ๋ฌธ์ ๊ฐ ์๊ธฐ๋ฉด ArgoCD ๊ณต์ ๋ฌธ์์ ์ปค๋ฎค๋ํฐ๋ฅผ ํ์ฉํด๋ด. Slack ์ฑ๋๋ ํ๋ฐํ๊ณ GitHub Issues๋ ์น์ ํ๊ฒ ๋ต๋ณํด์ค!
ํ๋ณตํ ๋ฐฐํฌ ๋๊ธธ ๋ฐ๋ผ! Happy GitOps! ๐โจ
๐ฏ ํต์ฌ ์์ฝ
GitOps = Git + Operations
๋ชจ๋ ์ธํ๋ผ๋ฅผ ์ฝ๋๋ก ๊ด๋ฆฌํ๊ณ , Git์ ๋จ์ผ ์ง์ค ๊ณต๊ธ์์ผ๋ก!
ArgoCD = GitOps์ ์ต๊ฐ ๋๊ตฌ
์๋ ๋๊ธฐํ, ์ง๊ด์ UI, ๊ฐ๋ ฅํ RBAC, ๋ฉํฐ ํด๋ฌ์คํฐ ์ง์!
์ค์ ์ ์ฉ = ์ ์ง์ ํ์ฅ
์์ ํ๋ก์ ํธ๋ถํฐ ์์ํด์ ๋จ๊ณ๋ณ๋ก ๊ธฐ๋ฅ์ ์ถ๊ฐํ์!
๊ด๋ จ ํค์๋
๋๊ธ ์์ฑ
์ด ๊ธ์ ๋ํ ์ฌ๋ฌ๋ถ์ ์๊ฐ์ ๋ค๋ ค์ฃผ์ธ์
๋ก๊ทธ์ธ์ด ํ์ํฉ๋๋ค
๋๊ธ์ ์์ฑํ๋ ค๋ฉด ๋จผ์ ๋ก๊ทธ์ธํด์ฃผ์ธ์.
๋๊ธ 0
์ง์์ธ์ ์ฒ - ์ง์ ์ฌ์ฐ๊ถ ๋ณดํธ ๊ณ ์ง
์ง์ ์ฌ์ฐ๊ถ ๋ณดํธ ๊ณ ์ง
- ์ ์๊ถ ๋ฐ ์์ ๊ถ: ๋ณธ ์ปจํ ์ธ ๋ ์ฌ๋ฅ๋ท์ ๋ ์ AI ๊ธฐ์ ๋ก ์์ฑ๋์์ผ๋ฉฐ, ๋ํ๋ฏผ๊ตญ ์ ์๊ถ๋ฒ ๋ฐ ๊ตญ์ ์ ์๊ถ ํ์ฝ์ ์ํด ๋ณดํธ๋ฉ๋๋ค.
- AI ์์ฑ ์ปจํ ์ธ ์ ๋ฒ์ ์ง์: ๋ณธ AI ์์ฑ ์ปจํ ์ธ ๋ ์ฌ๋ฅ๋ท์ ์ง์ ์ฐฝ์๋ฌผ๋ก ์ธ์ ๋๋ฉฐ, ๊ด๋ จ ๋ฒ๊ท์ ๋ฐ๋ผ ์ ์๊ถ ๋ณดํธ๋ฅผ ๋ฐ์ต๋๋ค.
- ์ฌ์ฉ ์ ํ: ์ฌ๋ฅ๋ท์ ๋ช ์์ ์๋ฉด ๋์ ์์ด ๋ณธ ์ปจํ ์ธ ๋ฅผ ๋ณต์ , ์์ , ๋ฐฐํฌ, ๋๋ ์์ ์ ์ผ๋ก ํ์ฉํ๋ ํ์๋ ์๊ฒฉํ ๊ธ์ง๋ฉ๋๋ค.
- ๋ฐ์ดํฐ ์์ง ๊ธ์ง: ๋ณธ ์ปจํ ์ธ ์ ๋ํ ๋ฌด๋จ ์คํฌ๋ํ, ํฌ๋กค๋ง, ๋ฐ ์๋ํ๋ ๋ฐ์ดํฐ ์์ง์ ๋ฒ์ ์ ์ฌ์ ๋์์ด ๋ฉ๋๋ค.
- AI ํ์ต ์ ํ: ์ฌ๋ฅ๋ท์ AI ์์ฑ ์ปจํ ์ธ ๋ฅผ ํ AI ๋ชจ๋ธ ํ์ต์ ๋ฌด๋จ ์ฌ์ฉํ๋ ํ์๋ ๊ธ์ง๋๋ฉฐ, ์ด๋ ์ง์ ์ฌ์ฐ๊ถ ์นจํด๋ก ๊ฐ์ฃผ๋ฉ๋๋ค.
์์ง ๋๊ธ์ด ์์ต๋๋ค.