๐Ÿ“‚
Amazon EKS
  • Amazon EKS
  • ์›Œํฌ์ŠคํŽ˜์ด์Šค ์ƒ์„ฑํ•˜๊ธฐ
    • Cloud9 IDE ํ™˜๊ฒฝ ๊ตฌ์„ฑ
    • IAM ์—ญํ•  ์ƒ์„ฑ
    • SSH & CMK Key ์ƒ์„ฑํ•˜๊ธฐ
  • EKS ํด๋Ÿฌ์Šคํ„ฐ ๊ตฌ์ถ•
    • EKS ํด๋Ÿฌ์Šคํ„ฐ ๋งŒ๋“ค๊ธฐ
  • ์ฟ ๋ฒ„๋„คํ‹ฐ์Šค ๋Œ€์‹œ๋ณด๋“œ ๋ฐฐํฌ
    • Kubernetes ๊ณต์‹ ๋Œ€์‹œ๋ณด๋“œ ๋ฐฐํฌ
  • ๋งˆ์ดํฌ๋กœ์„œ๋น„์Šค ๋ฐฐํฌ
    • ์˜ˆ์ œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ฐฐํฌ
    • ์„œ๋น„์Šค ์Šค์ผ€์ผ(Scaling)
    • ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์ •๋ฆฌํ•˜๊ธฐ
  • ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ฐฐํฌ - Helm
    • HELM ์„ค์น˜
    • Helm์œผ๋กœ Nginx ๋ฐฐํฌ
    • Helm์„ ์‚ฌ์šฉํ•˜์—ฌ ๋งˆ์ดํฌ๋กœ์„œ๋น„์Šค ๋ฐฐํฌ
    • ์ •๋ฆฌํ•˜๊ธฐ
  • ๋ฆฌ์†Œ์Šค ๊ด€๋ฆฌ - POD ๋ฐฐ์น˜
    • NodeSelector
    • Affinity and Anti-affinity
    • ๋” ์‹ค์šฉ์ ์ธ ์‚ฌ์šฉ ์‚ฌ๋ก€
    • ์ •๋ฆฌํ•˜๊ธฐ
  • ๋ฆฌ์†Œ์Šค ๊ด€๋ฆฌ - Health Checks
    • Liveness ํ”„๋กœ๋ธŒ ๊ตฌ์„ฑ
    • Readiness ํ”„๋กœ๋ธŒ ๊ตฌ์„ฑ
    • ์ •๋ฆฌํ•˜๊ธฐ
  • ๋ฆฌ์†Œ์Šค ๊ด€๋ฆฌ - AutoScaling
    • HPA ๊ตฌ์„ฑํ•˜๊ธฐ
    • CA ๊ตฌ์„ฑํ•˜๊ธฐ
    • ์ •๋ฆฌํ•˜๊ธฐ
  • ๋„คํŠธ์›Œํ‚น - ์„œ๋น„์Šค ๋…ธ์ถœ
    • ์„œ๋น„์Šค์™€ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ์—ฐ๊ฒฐ
    • ์„œ๋น„์Šค์— ์ ‘๊ทผํ•˜๊ธฐ
    • ์„œ๋น„์Šค ๋…ธ์ถœ
    • Ingress
    • Ingress Controller
    • ์ •๋ฆฌํ•˜๊ธฐ
  • ๋„คํŠธ์›Œํฌ - Calico ์ •์ฑ…
    • Calico ์„ค์น˜ํ•˜๊ธฐ
    • Stars Policy Demo
    • ์ •๋ฆฌํ•˜๊ธฐ
  • Updating ๊ถŒํ•œ์„ค์ • - RBAC
    • ํ…Œ์ŠคํŠธ POD ์„ค์น˜
    • ์‚ฌ์šฉ์ž ์ƒ์„ฑ ๋ฐ ๋งตํ•‘
    • ์—ญํ• ๊ณผ ๋ฐ”์ธ๋”ฉ
    • ์ •๋ฆฌํ•˜๊ธฐ
  • Updating ๊ถŒํ•œ์„ค์ • - IAM ๊ทธ๋ฃน
    • IAM Role, Group & User ์ƒ์„ฑํ•˜๊ธฐ
    • RBAC ์„ค์ •ํ•˜๊ธฐ
    • EKS ์—‘์„ธ์Šค ํ…Œ์ŠคํŠธ
    • ์ •๋ฆฌํ•˜๊ธฐ
  • Updating ๊ถŒํ•œ์„ค์ • - Service account
    • OIDC ์ž๊ฒฉ ์ฆ๋ช… ๊ณต๊ธ‰์ž ์ƒ์„ฑํ•˜๊ธฐ
    • IAM ์—ญํ•  ์ƒ์„ฑ ๋ฐ ์ง€์ •
    • ์ƒ˜ํ”Œ POD ๋ฐฐํฌ
    • ์ •๋ฆฌํ•˜๊ธฐ
  • Updating - ๋„คํŠธ์›Œํฌ - POD Security Group
    • SG ์ƒ์„ฑํ•˜๊ธฐ
    • RDS ์ƒ์„ฑํ•˜๊ธฐ
    • CNI ๊ตฌ์„ฑํ•˜๊ธฐ
    • SG ์ •์ฑ…
    • Pod ๋ฐฐํฌํ•˜๊ธฐ
    • ์ •๋ฆฌํ•˜๊ธฐ
  • Updating - ๋ชจ๋‹ˆํ„ฐ๋ง - Prometheus and Grafana
    • Prometheus ๋ฐฐํฌํ•˜๊ธฐ
    • Grafana ๋ฐฐํฌํ•˜๊ธฐ
    • ์ •๋ฆฌํ•˜๊ธฐ(Optional)
  • Updating ๋ชจ๋‹ˆํ„ฐ๋ง - X-Ray
    • X-Ray DaemonSet ๋ฐฐํฌํ•˜๊ธฐ
    • ์ƒ˜ํ”Œ ๋งˆ์ดํฌ๋กœ์„œ๋น„์Šค ๋ฐฐํฌ
    • X-Ray console ํ™•์ธ
    • ์ •๋ฆฌํ•˜๊ธฐ(Optional)
  • Updating ๋ชจ๋‹ˆํ„ฐ๋ง - Container Insights
    • ์‚ฌ์ „ ์ค€๋น„
    • Container Insights ๊ตฌ์„ฑํ•˜๊ธฐ
    • ๋ถ€ํ•˜ ํ…Œ์ŠคํŠธ
    • Container Insights ํ™•์ธํ•˜๊ธฐ
    • ์ •๋ฆฌํ•˜๊ธฐ(Optional)
  • Updating CD - Gitops with Flux
    • ์‚ฌ์ „ ์ค€๋น„
    • Codepipeline
    • EKS์— ๋ฐฐํฌ
    • ์ •๋ฆฌํ•˜๊ธฐ
  • Updating Argo Rollouts
  • Updating Service Mesh - AWS App Mesh
    • Fargate ๋ฐ OBSERVABILITY ๊ตฌ์„ฑ
    • Product Catalog App ๋ฐฐํฌ
    • APP MESH ์„ค์น˜
    • Porting to APP MESH
    • Virtual Gateway ๊ตฌ์„ฑ
    • Canary
    • Observability
  • Updating ๋ฒ„์ „ ์—…๊ทธ๋ ˆ์ด๋“œ - EKS Cluster
    • Upgrade EKS control Plane
    • Upgrade EKS CORE ADD-ONs
    • Upgrade Managed Node Group
Powered by GitBook
On this page
  • 1. Argo Rollouts ์„ค์น˜
  • 2. ์‹ค์Šต ํ™˜๊ฒฝ ๊ตฌ๊ฒฝ
  • 3. Canary ๋ฐฐํฌ ์ˆ˜ํ–‰

Was this helpful?

Updating Argo Rollouts

Kubernetes Progressive Delivery Controller

Previous์ •๋ฆฌํ•˜๊ธฐNextUpdating Service Mesh - AWS App Mesh

Last updated 1 year ago

Was this helpful?

Progressive Delivery๋Š” ์ œํ’ˆ์˜ ์—…๋ฐ์ดํŠธ๋ฅผ ์ œ์–ดํ•˜๊ณ  ์ ์ง„์ ์ธ ๋ฐฉ์‹์œผ๋กœ ๋ฆด๋ฆฌ์Šคํ•˜๋Š” ํ”„๋กœ์„ธ์Šค๋กœ, ์ผ๋ฐ˜์ ์œผ๋กœ ์ž๋™ํ™”์™€ ๋ฉ”ํŠธ๋ฆญ ๋ถ„์„์„ ๊ฒฐํ•ฉํ•˜์—ฌ ์—…๋ฐ์ดํŠธ์˜ ์ž๋™ ์Šน๊ฒฉ ๋˜๋Š” ๋กค๋ฐฑ์„ ์œ ๋„ํ•ฉ๋‹ˆ๋‹ค.

Progressive Delivery์€ CI/CD์—์„œ ์ œ๊ณตํ•˜๋Š” ์†๋„ ์ด์ ์„ ๊ตฌ์ถ• ํ”„๋กœ์„ธ์Šค๋กœ ํ™•์žฅํ•˜๋Š” continuous delivery์˜ ๋ฐœ์ „์œผ๋กœ ์„ค๋ช…๋˜๊ธฐ๋„ ํ•ฉ๋‹ˆ๋‹ค. ์ด๋Š” ์ƒˆ ๋ฒ„์ „์˜ ๋…ธ์ถœ์„ ์‚ฌ์šฉ์ž ํ•˜์œ„ ์ง‘ํ•ฉ์— ์ œํ•œํ•˜๊ณ  ์˜ฌ๋ฐ”๋ฅธ ๋™์ž‘์„ ๊ด€์ฐฐ ๋ฐ ๋ถ„์„ํ•œ ๋‹ค์Œ, ์ •ํ™•์„ฑ์„ ์ง€์†์ ์œผ๋กœ ๊ฒ€์ฆํ•˜๋ฉด์„œ ๋” ๋„“๊ณ  ๊ด‘๋ฒ”์œ„ํ•œ ๋Œ€์ƒ์ž์— ๋Œ€ํ•œ ๋…ธ์ถœ์„ ์ ์ง„์ ์œผ๋กœ ์ฆ๊ฐ€์‹œํ‚ด์œผ๋กœ์จ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

๋Š” Kubernetes ์ปจํŠธ๋กค๋Ÿฌ์ด์ž CRD ์ง‘ํ•ฉ์œผ๋กœ, Blue/green๊ณผ canary ๋ฐฐํฌ ๋ฐ ๋ถ„์„, ์‹คํ—˜ ๋ฐ Kubernetes์— ๋Œ€ํ•œ ์ ์ง„์  ์ œ๊ณต ๊ธฐ๋Šฅ๊ณผ ๊ฐ™์€ ๊ณ ๊ธ‰ ๋ฐฐํฌ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

Argo Rollouts์€ ์ˆ˜์‹  ์ปจํŠธ๋กค๋Ÿฌ ๋ฐ ์„œ๋น„์Šค ๋ฉ”์‹œ์™€ ํ†ตํ•ฉ๋˜์–ด ํŠธ๋ž˜ํ”ฝ ์กฐ์ ˆ ๊ธฐ๋Šฅ์„ ํ™œ์šฉํ•˜์—ฌ ์—…๋ฐ์ดํŠธ ์ค‘์— ํŠธ๋ž˜ํ”ฝ์„ ์ ์ฐจ ์ƒˆ ๋ฒ„์ „์œผ๋กœ ์ „ํ™˜ํ•ฉ๋‹ˆ๋‹ค. ๋˜ํ•œ ๋‹ค์–‘ํ•œ ๊ณต๊ธ‰์ž์˜ ๋ฉ”ํŠธ๋ฆญ์„ ์ฟผ๋ฆฌํ•˜๊ณ  ํ•ด์„ํ•˜์—ฌ ์ฃผ์š” KPI๋ฅผ ํ™•์ธํ•˜๊ณ  ์—…๋ฐ์ดํŠธ ์ค‘์— ์ž๋™ํ™”๋œ ํ”„๋กœ๋ชจ์…˜ ๋˜๋Š” ๋กค๋ฐฑ์„ ์ˆ˜ํ–‰ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

  • Blue/Green ์—…๋ฐ์ดํŠธ ์ „๋žต

  • Canary ์—…๋ฐ์ดํŠธ ์ „๋žต

  • ์„ธ๋ถ„ํ™”๋œ ํŠธ๋ž˜ํ”ฝ ์ œ์–ด

  • ์ž๋™ ๋กค๋ฐฑ ๋ฐ ํ”„๋กœ๋ชจ์…˜

  • ์‚ฌ์šฉ์ž ์ง€์ • ๊ฐ€๋Šฅํ•œ ๋ฉ”ํŠธ๋ฆญ ์ฟผ๋ฆฌ ๋ฐ ๋น„์ฆˆ๋‹ˆ์Šค KPI ๋ถ„์„

  • Ingress controller : NGINX, ALB

  • ์„œ๋น„์Šค ๋ฉ”์‹œ : Istio, Linkerd, SMI

  • Metric : Prometeus, Wavefront, Kayenta, Web, Kubernetes Jobs, Datadog, New Relic, Graphite

๋ณธ ์‹ค์Šต์€ Argo rollout ์˜ Basic usage๋ฅผ ํ™œ์šฉํ•˜์˜€์Šต๋‹ˆ๋‹ค.

1. Argo Rollouts ์„ค์น˜

Quick start๋กœ Rollout Controller๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. Controller๊ฐ€ ๋™์ž‘ํ•  argo-rollouts ๋„ค์ž„์ŠคํŽ˜์ด์Šค๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

mkdir ~/environment/argo-rollout-demo
cd ~/environment/argo-rollout-demo

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

kubectl ํ”Œ๋Ÿฌ๊ทธ์ธ ๋ฅผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค. kubectl ํ”Œ๋Ÿฌ๊ทธ์ธ์€ ์„ ํƒ ์‚ฌํ•ญ์ด์ง€๋งŒ ๋ช…๋ น์ค„์—์„œ ๋กค์•„์›ƒ์„ ๊ด€๋ฆฌํ•˜๊ณ  ์‹œ๊ฐํ™”ํ•˜๋Š” ๋ฐ ํŽธ๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

curl -LO https://github.com/argoproj/argo-rollouts/releases/latest/download/kubectl-argo-rollouts-linux-amd64

chmod +x ./kubectl-argo-rollouts-linux-amd64

sudo mv ./kubectl-argo-rollouts-linux-amd64 /usr/local/bin/kubectl-argo-rollouts

์•„๋ž˜ ๋ช…๋ น์–ด๋กœ rollouts์ด ์„ค์น˜๋˜์—ˆ๋Š”์ง€ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

kubectl argo rollouts version

2. ์‹ค์Šต ํ™˜๊ฒฝ ๊ตฌ๊ฒฝ

์‹ค์Šต์— ํ•„์š”ํ•œ yaml ํŒŒ์ผ์„ ๋‹ค์šด๋กœ๋“œ ๋ฐ›์Šต๋‹ˆ๋‹ค.

curl -Lo rollout.yaml https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/alb/rollout.yaml
curl -Lo service.yaml https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/alb/services.yaml
curl -Lo ingress.yaml https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/alb/ingress.yaml
curl -Lo bluegreen.yaml https://raw.githubusercontent.com/argoproj/argo-rollouts/master/docs/getting-started/basic/rollout.yaml

ํŒŒ์ผ rollout.yaml, service.yaml, ingress.yaml, bluegreen.yaml ์ด๋ ‡๊ฒŒ 4๊ฐœ ํŒŒ์ผ์ด ์žˆ์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค.

rollout.yaml ํŒŒ์ผ์„ ๋ณด๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด canary strategy๊ฐ€ ์ •์˜๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

apiVersion: argoproj.io/v1alpha1
kind: Rollout
metadata:
  name: rollouts-demo
spec:
  strategy:
    canary:
      # canaryService and stableService are references to Services which the Rollout will modify
      # to target the canary ReplicaSet and stable ReplicaSet respectively (required).
      canaryService: rollouts-demo-canary
      stableService: rollouts-demo-stable
      trafficRouting:
        alb:
          # The referenced ingress will be injected with a custom action annotation, directing
          # the AWS Load Balancer Controller to split traffic between the canary and stable
          # Service, according to the desired traffic weight (required).
          ingress: rollouts-demo-ingress
          # Reference to a Service that the Ingress must target in one of the rules (optional).
          # If omitted, uses canary.stableService.
          rootService: rollouts-demo-root
          # Service port is the port which the Service listens on (required).
          servicePort: 443
...

๋‹ค์šด ๋ฐ›์€ 3๊ฐœ์˜ ํŒŒ์ผ์„ ์ ์šฉํ•ฉ๋‹ˆ๋‹ค.

kubectl apply -f rollout.yaml
kubectl apply -f service.yaml
kubectl apply -f ingress.yaml

์„ค์น˜ ์ดํ›„ ์•„๋ž˜ ๋ช…๋ น์–ด๋กœ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

kubectl get ro
kubectl get svc
kubectl get ingress

rollout์„ ํ†ตํ•˜์—ฌ ํ˜„์žฌ ๋ฐฐํฌ ์ƒํƒœ๋ฅผ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

kubectl argo rollouts get rollout rollouts-demo

3. Canary ๋ฐฐํฌ ์ˆ˜ํ–‰

image๋ฅผ ๋ณ€๊ฒฝํ•˜์—ฌ rollout์— ๋Œ€ํ•œ ์—…๋ฐ์ดํŠธ๋ฅผ ์ˆ˜ํ–‰ํ•ฉ๋‹ˆ๋‹ค.

kubectl argo rollouts set image rollouts-demo rollouts-demo=argoproj/rollouts-demo:yellow
kubectl argo rollouts get rollout rollouts-demo

์ด ์‹œ์ ์—์„œ๋Š” Canary ๋ฐ stable ๋ฒ„์ „์˜ ์›๊ฒฉ ์„ค์น˜๊ฐ€ ๋ชจ๋‘ ์‹คํ–‰ ์ค‘์ด๋ฉฐ ํŠธ๋ž˜ํ”ฝ์˜ 5%๊ฐ€ Canary๋กœ ํ–ฅํ•ฉ๋‹ˆ๋‹ค. ์ด ๋ฐฉ๋ฒ•์ด ์–ด๋–ป๊ฒŒ ์ž‘๋™ํ•˜๋Š”์ง€ ์ดํ•ดํ•˜๋ ค๋ฉด, ALB์— listener rule์„ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.

์ฝ˜์†”์˜ EC2->load balancer ์—์„œ ์ƒ์„ฑ๋œ ALB๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ํ•˜๋‹จ ํƒญ์˜ ๋ฆฌ์Šค๋„ˆ์—์„œ ๊ทœ์น™๋ณด๊ธฐ/ํŽธ์ง‘์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.

์•„๋ž˜ ๋ช…๋ น์–ด๋ฅผ ์ˆ˜ํ–‰ํ•˜์—ฌ ์ •์ง€๋˜์–ด ์žˆ๋Š” ๋ฐฐํฌ๋ฅผ ์™„๋ฃŒํ•ฉ๋‹ˆ๋‹ค.

kubectl argo rollouts promote rollouts-demo

kubectl argo rollouts get rollout rollouts-demo

Ingress Controller (AWS Load Balancer Controller)๋ฅผ ์— ๋”ฐ๋ผ ์„ค์น˜ํ•ฉ๋‹ˆ๋‹ค.

Load Balancer Controller Installation ๊ฐ€์ด๋“œ ์›๋ณธ :

https://argoproj.github.io/argo-rollouts/getting-started/
๊ฐ€์ด๋“œ
https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.3/deploy/installation/
Argo Rollouts