Argo CD Canary ๐Ÿ•Š ๋ฐฐํฌ ๋ฐฉ๋ฒ•

์ด์ค€์„ยท2022๋…„ 8์›” 9์ผ
0

Infra

๋ชฉ๋ก ๋ณด๊ธฐ
4/5
post-thumbnail
post-custom-banner

์„œ๋ก 

์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋ฌด์ค‘๋‹จ์œผ๋กœ ๋ฐฐํฌํ•˜๋Š” ๋ฐฉ๋ฒ•์œผ๋กœ๋Š” Rolling, Blue/Green, Canary ๋ฐฉ์‹์ด ๊ฐ€์žฅ ๋Œ€ํ‘œ์ ์ธ ๋ฐฉ๋ฒ•์ด๋ผ๊ณ  ์ƒ๊ฐ๋œ๋‹ค.

ํ˜„์žฌ Kubernetes ์—์„œ ๊ธฐ๋ณธ์ ์œผ๋กœ ์ง€์›ํ•˜๋Š” ๋ฐฐํฌ ๋ฐฉ์‹์€ Rolling ๋ฐฉ์‹์œผ๋กœ ์ƒˆ๋กœ์šด ์„œ๋ฒ„๊ฐ€ ์ƒ์„ฑ๋˜๋ฉด ์ผ๊ด„๋กœ ๊ธฐ์กด ์„œ๋ฒ„๊ฐ€ ์‚ญ์ œ๋˜๋Š” ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•œ๋‹ค. ํ•ด๋‹น ๋ฐฉ์‹๋„ ๋‚˜์œ ๋ฐฉ์‹์€ ์•„๋‹ˆ์ง€๋งŒ ์ƒˆ๋กœ์šด ์„œ๋ฒ„์— ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ•  ๊ฒฝ์šฐ ๋กค๋ฐฑํ•˜๊ธฐ๊ฐ€ ๊ต‰์žฅํžˆ ๋ฒˆ๊ฑฐ๋กœ์›Œ์ง„๋‹ค.

๋”ฐ๋ผ์„œ ๋ณดํ†ต ์šด์˜ ํ™˜๊ฒฝ์—์„œ๋Š” Blue/Green ๋ฐฐํฌ์™€ Canary ๋ฐฐํฌ๋ฅผ ๋งŽ์ด ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์œผ๋กœ ์•Œ๊ณ  ์žˆ๋Š”๋ฐ ์˜ค๋Š˜์€ ๊ทธ ์ค‘์—์„œ Canary ๋ฐฐํฌ๋ฅผ AWS EKS ์™€ Argo CD ์— ์ ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด์„œ ์•Œ์•„๋ณผ ์˜ˆ์ •์ด๋‹ค.

๋ฌด์ค‘๋‹จ ๋ฐฐํฌ ๋ฐฉ์‹์— ๋Œ€ํ•œ ์„ค๋ช…์€ ๋‹ค๋ฅธ ๋ธ”๋กœ๊ทธ์— ์ž์„ธํ•˜๊ฒŒ ์„ค๋ช…์ด ๋˜์–ด์žˆ์œผ๋ฏ€๋กœ ์ œ๊ฐ€ ์‚ดํŽด๋ดค๋˜ ๋ธ”๋กœ๊ทธ ๋งํฌ๋งŒ ๊ฑธ๊ณ  ์ถ”๊ฐ€์ ์ธ ์„ค๋ช…์€ ํ•˜์ง€ ์•Š๊ฒ ์Šต๋‹ˆ๋‹ค.

ํ•ด๋‹น ๋‚ด์šฉ์œผ๋กœ๋„ ๋ถ€์กฑํ•˜๋‹ค๋ฉด ๊ตฌ๊ธ€๋ง์œผ๋กœ ๋” ์ฐพ์•„๋ณด์‹œ๋ฉด ๋ ๊บผ ๊ฐ™์Šต๋‹ˆ๋‹ค!

๋ณธ๋ก 

๋จผ์ €, Argo CD ์™€ AWS EKS ๋Š” ์„ค์ •์ด ์ „๋ถ€ ๋˜์–ด์žˆ๋‹ค๋Š” ๊ฐ€์ •์œผ๋กœ ์‹œ์ž‘ํ•  ์˜ˆ์ •์ž…๋‹ˆ๋‹ค. ์„ค์ •์ด ์•ˆ๋˜์–ด์žˆ์œผ๋ฉด ์ด์ „ ์„น์…˜์„ ํ†ตํ•ด์„œ ์„ค์ •์„ ์ง„ํ–‰ ํ•œ ํ›„ ํ•ด๋‹น ๋ณธ๋ฌธ์œผ๋กœ ๋Œ์•„์˜ค์‹œ๋ฉด ๋ ๊บผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

Argo CD Rollouts ์„ค์น˜

Argo CD ์—์„œ ๊ณต์‹์œผ๋กœ ์ง€์›ํ•˜๋Š” Progressive delivery ํˆด์ด ์กด์žฌํ•ฉ๋‹ˆ๋‹ค.
๊ณต์‹ ํ™ˆํŽ˜์ด์ง€ ๋‚ด์šฉ์„ ๊ธฐ๋ฐ˜์œผ๋กœ ์„ค๋ช…๋“œ๋ฆฌ๋„๋ก ํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค.

๋จผ์ €, AWS EKS ์— Argo CD Rollouts Controller ๋ฅผ ์„ค์น˜ํ•ด์ค๋‹ˆ๋‹ค. ์„ค์น˜ ๋ช…๋ น์–ด๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

kubectl create namespace argo-rollouts
kubectl apply -n argo-rollouts -f https://github.com/argoproj/argo-rollouts/releases/latest/download/install.yaml

๋„ค์ž„์ŠคํŽ˜์ด์Šค๋Š” ๋ณ„๋„์˜ ์„ค์ •์„ ํ•˜์ง€ ์•Š๋Š” ์ด์ƒ argo-rollouts ์œผ๋กœ ๊ณ ์ •ํ•ด์„œ ์ƒ์„ฑํ•˜๊ณ  ํ•ด๋‹น ๋„ค์ž„์ŠคํŽ˜์ด์Šค์— ์„ค์น˜ํ•ด์ฃผ์…”์•ผ ๋ฉ๋‹ˆ๋‹ค. ๊ผญ ๋‹ค๋ฅธ ๋„ค์ž„์ŠคํŽ˜์ด์Šค์— ์„ค์น˜ํ•ด์•ผ ๋˜๋Š”๊ฒŒ ์•„๋‹Œ ์ด์ƒ์€ ๋ณ€๊ฒฝํ•˜์ง€ ์•Š๊ณ  ๊ทธ๋Œ€๋กœ ๋ช…๋ น์–ด๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

๊ทธ ๋‹ค์Œ Argo CD Rollouts ์‚ฌ์šฉ์„ ์ข€ ๋” ํŽธ๋ฆฌํ•˜๊ฒŒ ํ•ด์ฃผ๋Š” kubectl ํ”Œ๋Ÿฌ๊ทธ์ธ์ด ์กด์žฌํ•˜๋Š”๋ฐ ์„ ํƒ์‚ฌํ•ญ์ด๋ผ๊ณ  ๋‚˜์™€์žˆ์ง€๋งŒ ๋ชจ๋“  ์„ค๋ช…์ด ํ”Œ๋Ÿฌ๊ทธ์ธ ์‚ฌ์šฉ์œผ๋กœ ๋‚˜์™€์žˆ์–ด์„œ ์„ค์น˜ํ•ด์ฃผ์‹œ๋Š”๊ฑธ ๊ถŒ์žฅ๋“œ๋ฆฝ๋‹ˆ๋‹ค. ์„ค์น˜ ๋ฐฉ๋ฒ•์€ ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค.

kubectl ๋ช…๋ น์„ ์ด์šฉํ•˜๋Š” ์„œ๋ฒ„์— ํ•ด๋‹น ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์„ค์น˜ํ•ด์ฃผ์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์ €์˜ ๊ฒฝ์šฐ ๋ฐฐ์Šค์ฒœ ์„œ๋ฒ„๋ฅผ ํ†ตํ•ด์„œ EKS ์— ์ ‘๊ทผํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๋ฐฐ์Šค์ฒœ ์„œ๋ฒ„์— ํ•ด๋‹น ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. (Linux OS ๊ธฐ์ค€)

โš™๏ธ ๊ณต์‹ ํ™ˆํŽ˜์ด์ง€์—์„œ ์ œ์‹œํ•˜๋Š” ์„ค์น˜ ๋ฐฉ๋ฒ•

curl -LO https://github.com/argoproj/argo-rollouts/releases/latest/download/kubectl-argo-rollouts-darwin-amd64
chmod +x ./kubectl-argo-rollouts-darwin-amd64
sudo mv ./kubectl-argo-rollouts-darwin-amd64 /usr/local/bin/kubectl-argo-rollouts

์œ„์˜ ๋ฐฉ์‹๋Œ€๋กœ ํ–ˆ๋Š”๋ฐ Unknown command error 'argo' ๋ญ์‹œ๊ธฐ๊ฐ€ ๋œจ์‹œ๋ฉด ์•„๋ž˜ ๋ฐฉ์‹์œผ๋กœ ์„ค์น˜๋ฅผ ํ•ด๋ณด์‹œ๋ฉด ์ •์ƒ์ ์œผ๋กœ ๋ ๊ฒ๋‹ˆ๋‹ค.

โš™๏ธ ๋‚ด๊ฐ€ ์ œ์‹œํ•˜๋Š” ์„ค์น˜ ๋ฐฉ๋ฒ•

curl -LO https://github.com/argoproj/argo-rollouts/releases/latest/download/kubectl-argo-rollouts-linux-amd64
sudo install -o root -g root -m 0755 kubectl-argo-rollouts-linux-amd64 /usr/local/bin/kubectl-argo-rollouts

๋‹ค๋ฅธ ๋ฒ„์ „์œผ๋กœ ์„ค์น˜ํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ ํ•ด๋‹น ๋งํฌ์—์„œ ์›ํ•˜๋Š” ๋ฒ„์ „์œผ๋กœ curl ๋ช…๋ น์„ ์ด์šฉํ•ด์„œ ์„ค์น˜ํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

๋งˆ์ง€๋ง‰์œผ๋กœ ์ž˜ ์„ค์น˜๊ฐ€ ๋˜์—ˆ๋Š”์ง€ ํ™•์ธํ•˜๊ธฐ ์œ„ํ•ด์„œ ์•„๋ž˜ ๋ช…๋ น์„ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.

$ kubectl argo rollouts version
kubectl-argo-rollouts: v1.2.0-rc2+7b69058
  BuildDate: 2022-02-24T22:32:47Z
  GitCommit: 7b690580f69fd491f40c15b3ff4031f13bdae332
  GitTreeState: clean
  GoVersion: go1.17.6
  Compiler: gc
  Platform: linux/amd64

Canary ๋ฐฐํฌ์šฉ YAML ํŒŒ์ผ ์ž‘์„ฑ

์ด์ œ ์„ค์ •์€ ์ „๋ถ€ ๋๋‚˜๊ณ  Canary๋กœ ๋ฐฐํฌํ•  ์ˆ˜ ์žˆ๋„๋ก YAML ํŒŒ์ผ์„ ์ž‘์„ฑํ•ด์•ผ ํ•œ๋‹ค. ์ผ๋‹จ ์˜ˆ์ œ ํŒŒ์ผ์„ ๋ฐ”ํƒ•์œผ๋กœ ์„ค๋ช…์„ ํ•  ์˜ˆ์ •์ด๊ณ  ์˜ˆ์ œ ํŒŒ์ผ์€ ํ•ด๋‹น ๊นƒํ—ˆ๋ธŒ ํŽ˜์ด์ง€์—์„œ ๊ฐ€์ ธ์™”์Šต๋‹ˆ๋‹ค.

apiVersion: argoproj.io/v1alpha1
kind: Rollout # Rollout์œผ๋กœ ์ƒ์„ฑ
metadata:
  name: canary-rollout
spec:
  replicas: 8
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      app: canary
  template:
    metadata:
      labels:
        app: canary
    spec:
      containers:
      - name: canary-rollouts-demo
        image: particule/simplecolorapi:1.0
        imagePullPolicy: Always
        ports:
        - containerPort: 5000
  # ์ด ๋ถ€๋ถ„์—์„œ ์นด๋‚˜๋ฆฌ๋กœ ์ง€์ •
  strategy:
    canary:
      maxSurge: "25%"    # canary ๋ฐฐํฌ๋กœ ์ƒ์„ฑํ•  pod์˜ ๋น„์œจ
      maxUnavailable: 0  # ์—…๋ฐ์ดํŠธ ๋  ๋•Œ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๋Š” pod์˜ ์ตœ๋Œ€ ์ˆ˜
      steps:
      - setWeight: 25    # ์นด๋‚˜๋ฆฌ๋กœ ๋ฐฐํฌ๋œ ์„œ๋ฒ„๋กœ ์ „์†กํ•ด์•ผ๋  ํŠธ๋ž˜ํ”ฝ ๋น„์œจ
      - pause: {}        # AutoPromotion Time (ํ•˜๋‹จ ์„ค๋ช… ์ฐธ์กฐ)
---
kind: Service
apiVersion: v1
metadata:
  name: canary-service
spec:
  selector:
    app: canary
  ports:
  - protocol: TCP
    port: 80
    targetPort: 5000
    nodePort: 30081
  type: NodePort

๋ณดํ†ต pod ๋ฅผ ๋ฐฐํฌํ•˜๊ธฐ ์œ„ํ•ด์„œ kind ๋ฅผ Deployment ๋กœ ์ƒ์„ฑํ•ด์„œ ์‚ฌ์šฉํ•˜์˜€์„ํ…๋ฐ Canary ๋ฐฐํฌ๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด kind ๋ฅผ Rollout ์œผ๋กœ ๋ณ€๊ฒฝํ•ด์ฃผ๊ณ  strategy ๋ฅผ ์„ค์ •ํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค. strategy ๊ฐ€ ์ถ”๊ฐ€๋˜๋Š” ๋ถ€๋ถ„ ๋ง๊ณ ๋Š” Deployment ์—์„œ ์ž‘์„ฑํ•˜๋Š” ์„ค์ •์„ ๊ทธ๋Œ€๋กœ ์ž‘์„ฑํ•ด์ฃผ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

์œ„์˜ ํŒŒ์ผ์—์„œ Auto Promotion ์ด๋ผ๋Š” ๋ง์ด ์žˆ๋Š”๋ฐ, ์ƒˆ๋กœ์šด ์„œ๋ฒ„๊ฐ€ maxSurge ์— ์ ํžŒ ํผ์„ผํ‹ฐ์ง€์— ๋”ฐ๋ผ์„œ ๊ทธ ์ˆ˜๋งŒํผ ๋ฐฐํฌ๊ฐ€ ๋˜๋Š”๋ฐ, ์ƒˆ๋กœ์šด ์„œ๋ฒ„๊ฐ€ Canary ๋ฐฐํฌ๋œ ํ›„ ์–ผ๋งˆ๋‚˜ ์‹œ๊ฐ„์ด ํ๋ฅธ ๋’ค ์ƒˆ๋กœ์šด ์„œ๋ฒ„๋กœ ์ „๋ถ€ ๋ฐฐํฌํ• ๊นŒ์š”? ๋ผ๋Š” ์„ค์ •์ด๋‹ค.

๋”ฐ๋ผ์„œ pause์— 10๋ถ„์œผ๋กœ ์„ค์ •ํ•ด๋‘๋ฉด ์ƒˆ๋กœ์šด ์„œ๋ฒ„๊ฐ€ Canary๋กœ ๋ฐฐํฌ๋œ ํ›„ 10๋ถ„ ๋’ค์— ๊ธฐ์กด ์„œ๋ฒ„๊ฐ€ ์ ์ง„์ ์œผ๋กœ ์‚ญ์ œ๋˜๋ฉด์„œ ์ƒˆ๋กœ์šด ์„œ๋ฒ„๊ฐ€ ์ƒ์„ฑ๋˜๋Š” ๊ฒƒ์„ ๋งํ•œ๋‹ค.

์ถ”๊ฐ€๋กœ pause์—๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์„ค์ •์ด ๋“ค์–ด๊ฐˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

- pause: { duration: 30 }  # 30์ดˆ
- pause: { duration: 30s } # 30์ดˆ
- pause: { duration: 30m } # 30๋ถ„
- pause: { duration: 30h } # 30์‹œ๊ฐ„
- pause: {}                # Auto Promotion ์˜ต์…˜ ๋น„ํ™œ์„ฑํ™”
- pause: { duration: -10 } # ์ž˜๋ชป๋œ ์˜ต์…˜

๊ฒฐ๊ณผ

๋”ฐ๋ผ์„œ ํ•ด๋‹น YAML ํŒŒ์ผ์„ Argo CD Application ์„ ์ƒ์„ฑํ•ด์„œ ๋ฐฐํฌํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ชจ์Šต์„ ๊ฐ€์ง‘๋‹ˆ๋‹ค.

replicas ๋ฅผ 8๋กœ ์„ค์ •ํ•ด๋‘์—ˆ๊ธฐ ๋•Œ๋ฌธ์— 8๊ฐœ์˜ pod๊ฐ€ ์ƒ์„ฑ๋œ ๋ชจ์Šต์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

์—ฌ๊ธฐ์„œ YAML ํŒŒ์ผ์— ์ด๋ฏธ์ง€ ํƒœ๊ทธ ๋ฒ„์ „์„ ๋ณ€๊ฒฝํ•ด์„œ ์ƒˆ๋กญ๊ฒŒ ์„œ๋ฒ„๋ฅผ ๋„์šฐ๋„๋ก ํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ๋ชจ์Šต์œผ๋กœ ์„œ๋ฒ„๊ฐ€ ์ƒ์„ฑ๋œ๋‹ค. (ex. container -> image ์— ์ ํ˜€์žˆ๋Š” 1.0 ์„ 2.0์œผ๋กœ ๋ณ€๊ฒฝํ•œ๋‹ค.)

์œ„์— ๋นจ๊ฐ„์ƒ‰ ๋ถ€๋ถ„์ด ์ƒˆ๋กญ๊ฒŒ Canary ๋ฐฐํฌ๋กœ ์ƒ์„ฑ๋œ ์ƒˆ๋กœ์šด ์„œ๋ฒ„์ด๋‹ค. maxSurge๊ฐ€ 25%๋กœ ์„ค์ •๋˜์–ด ์žˆ๊ณ  replicas ๊ฐ€ 8 ๋กœ ๋˜์–ด์žˆ๊ธฐ ๋•Œ๋ฌธ์— 8 * 25 / 100 ์„ ๊ณ„์‚ฐํ•˜๋ฉด 2 ๊ฐ€ ๋‚˜์˜จ๋‹ค. ๋”ฐ๋ผ์„œ 2๊ฐœ์˜ ์ƒˆ๋กœ์šด ์„œ๋ฒ„๋งŒ ๋„์›Œ์ ธ ์žˆ๋Š” ๋ชจ์Šต์„ ๋ณผ ์ˆ˜ ์žˆ๋‹ค.

์—ฌ๊ธฐ์„œ pause ๊ฐ’์— ์‹œ๊ฐ„์ด ์ •ํ•ด์ ธ ์žˆ์œผ๋ฉด ๊ทธ ์‹œ๊ฐ„๋งŒํผ ์‹œ๊ฐ„์ด ํ๋ฅธ ๋’ค ์ž๋™์œผ๋กœ ํŒŒ๋ž€์ƒ‰ ๋ถ€๋ถ„์— ์žˆ๋Š” ๊ธฐ์กด ์„œ๋ฒ„๋ฅผ ์‚ญ์ œํ•˜๊ณ  ๋นจ๊ฐ„์ƒ‰ ๋ถ€๋ถ„์— ์ƒˆ๋กœ์šด ์„œ๋ฒ„๊ฐ€ 8๊ฐœ๋กœ ์ ์ง„์  ์ƒ์„ฑ์ด ๋œ๋‹ค.

๋งŒ์•ฝ ์ˆ˜๋™์œผ๋กœ promote ํ•˜๊ณ  ์‹ถ์„ ๊ฒฝ์šฐ ๋‹ค์Œ ๋ช…๋ น์„ ์ž…๋ ฅํ•ด์„œ promote ํ•  ์ˆ˜ ์žˆ๋‹ค.

kubectl argo rollouts promote \
canary-rollout (YAML ํŒŒ์ผ์—์„œ metadata์— ์ ์€ name ๊ฐ’) \
-n canary(์ž์‹ ์ด ์ƒ์„ฑํ•œ ๋„ค์ž„์ŠคํŽ˜์ด์Šค ์œ„์น˜)
$ kubectl argo rollouts promote canary-rollout -n canary
rollout 'canary-rollout' promoted

์ด๋ ‡๊ฒŒ ํ•˜๋ฉด kubernetes ์—์„œ๋„ Argo CD ๋ฅผ ์ด์šฉํ•˜์—ฌ Canary ๋ฐฐํฌ๋ฅผ ์ง„ํ–‰ํ•  ์ˆ˜ ์žˆ๋‹ค. Blue/Green ๋ฐฐํฌ๋„ ์ด์šฉํ•  ์ˆ˜ ์žˆ์œผ๋ฏ€๋กœ ๊ถ๊ธˆํ•˜์‹  ๋ถ„๋“ค์€ ๊ตฌ๊ธ€๋ง์„ ํ†ตํ•ด์„œ ์šฐ์„  ์‚ดํŽด๋ณด์‹œ๋ฉด ๋ ๊ฑฐ ๊ฐ™์Šต๋‹ˆ๋‹ค!

๊ฒฐ๋ก 

Canary ๋ฐฐํฌ๋กœ ๋ฐ”๊พธ๋Š”๋ฐ ๊ต‰์žฅํžˆ ์–ด๋ ค์šธ์ค„ ์•Œ์•˜๋˜ ๋ฐ˜๋ฉด์— ํ”Œ๋Ÿฌ๊ทธ์ธ์œผ๋กœ ์†์‰ฝ๊ฒŒ ๋ฐ”๋€Œ๋Š” ๋ชจ์Šต์„ ๋ณด๊ณ ๋Š” ์‚ด์ง ๋†€๋žฌ๋‹ค. ํ•˜์ง€๋งŒ ์ฃผ์˜ํ•  ์ ์œผ๋กœ ์ƒˆ๋กœ์šด ์„œ๋ฒ„์™€ ๊ธฐ์กด ์„œ๋ฒ„๊ฐ€ ๊ณต์กดํ•˜๋Š” ๋งŒํผ API ํ˜ธํ™˜์„ฑ์— ๋Œ€ํ•ด ๋” ์‹ ๊ฒฝ์จ์•ผ ํ•  ๊ฒƒ ๊ฐ™์•„ ๋ณด์ธ๋‹ค.

์ƒˆ๋กœ์šด ์„œ๋ฒ„์—๋Š” v2 ๋ฒ„์ „์œผ๋กœ API๊ฐ€ ์ „๋ถ€ ์ž‘์„ฑ๋˜์–ด์žˆ์–ด์„œ ๊ธฐ์กด ์„œ๋ฒ„์— ์ƒ์„ฑ๋œ v1 ์ด ํ˜ธํ™˜๋˜์ง€ ์•Š๋Š”๋‹ค๋ฉด setWeight ์— ์„ค์ •๋œ 25% ํŠธ๋ž˜ํ”ฝ์—์„œ ๋Œ€ํ•ด์„œ๋Š” ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•  ๊ฒƒ์ด๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

์ด์ ๋งŒ ์œ ์˜ํ•ด์„œ ์ง„ํ–‰ํ•œ๋‹ค๋ฉด ์ข‹์€ ๋ฐฐํฌ ๋ฐฉ์‹์ด ๋˜์ง€ ์•Š์„๊นŒ ์‹ถ์Šต๋‹ˆ๋‹ค.

์ด๋ฒˆ์— ๊ฐ€์žฅ ํ—ค๋งจ ๋ถ€๋ถ„์ด ํ”Œ๋Ÿฌ๊ทธ์ธ ์„ค์น˜ํ•˜๋Š” ๋ถ€๋ถ„์—์„œ ์—„์ฒญ ํ—ค๋งธ๋Š”๋ฐ ๊ณต์‹ ํ™ˆํŽ˜์ด์ง€ ๋ฐฉ์‹๋Œ€๋กœ ์„ค์น˜ํ•˜๋ฉด ๊ณ„์† 'Unknown command' ์—๋Ÿฌ๊ฐ€ ๋– ์„œ ๊ณ„์† ์ฐพ๋‹ค๊ฐ€ kubectl์€ ์–ด๋–ป๊ฒŒ ์„ค์น˜ํ•˜๋‚˜ ์‚ดํŽด๋ดค๋”๋‹ˆ ๋‹ค๋ฅธ ๋ฐฉ์‹์œผ๋กœ ์„ค์น˜ํ•˜๊ณ  ์žˆ๋Š”๊ฑธ ์บ์น˜ํ–ˆ๊ณ  ๊ทธ ๋ฐฉ์‹๋Œ€๋กœ ํ•˜๋‹ˆ๊นŒ ์ ์šฉ์ด ๋˜์—ˆ๋‹ค. (1์‹œ๊ฐ„ ์ •๋„ ํ—ค๋งธ๊ฑฐ ๊ฐ™๋‹ค.)

์•„๋ฌด์ชผ๋ก ๋น ๋ฅด๊ฒŒ ๋ฐœ๊ฒฌํ•ด์„œ ๊ธˆ๋ฐฉ ํ•ด๊ฒฐํ•  ์ˆ˜ ์žˆ์–ด์„œ ๋‹คํ–‰์ด๋‹ค.

๋‘์„œ์—†๊ณ  ๊ธด ๊ธ€ ์ฝ์–ด์ฃผ์…”์„œ ๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค. ์ด์ด ๐Ÿƒ๐Ÿปโ€โ™€๏ธ

profile
ํ˜ธ์ฃผ ์›Œํ™€์ค‘ https://blog.naver.com/wnstjrl96
post-custom-banner

0๊ฐœ์˜ ๋Œ“๊ธ€