๋กœ์ผ“๐Ÿพ
article thumbnail

 

๋ˆ„๊ตฌ๋‚˜ ํ•œ๋ฒˆ ์ฏค์€ ์Šˆ๋ขฐ๋”ฉ๊ฑฐ์˜ ๊ณ ์–‘์ด์— ๋Œ€ํ•ด์„œ ๋“ค์—ˆ๊ฑฐ๋‚˜ ๊ด€๋ จ ๋ฐˆ์„ ๋ณด์…จ์„ ๊ฒ๋‹ˆ๋‹ค.

๊ทธ๋ž˜๋„ ํ˜น์‹œ ๋ชจ๋ฅด์‹œ๋Š” ๋ถ„๋“ค์„ ์œ„ํ•ด ๊ฐ„๋‹จํžˆ ์•Œ๋ ค๋“œ๋ฆฌ์ฃ .

 

๊ณ ์–‘์ด๋ฅผ ๋ณด์ด์ง€ ์•Š๋Š” ์ƒ์ž์— ๋„ฃ๊ณ , ๊ทธ ์†์— 50:50 ํ™•๋ฅ ๋กœ ๊ณ ์–‘์ด๋ฅผ ์ฃฝ์ด๋Š” ๋…๊ทน๋ฌผ์„ ๋„ฃ์—ˆ์„ ๋•Œ ๊ณ ์–‘์ด๋Š” ์ฃฝ์„๊นŒ์š”? ์‚ด๊นŒ์š”? 

์ผ๋ฐ˜ ์„ธ๊ณ„์—์„œ๋Š” ์ฃฝ์—ˆ๋‹ค, ์‚ด์•˜๋‹ค ๋ผ๊ณ  ํ‘œํ˜„ํ•˜์ง€๋งŒ ์–‘์ž์—ญํ•™ ์„ธ๊ณ„์—์„œ๋Š” ์ด๋ฅผ ์ฃฝ์Œ๊ณผ ์‚ถ์ด ์ค‘์ฒฉ๋œ ์ƒํƒœ๋ผ๊ณ  ํ‘œํ˜„ํ•ฉ๋‹ˆ๋‹ค.

 

์ฆ‰, ์‚ด์•„์žˆ์œผ๋ฉด์„œ ์ฃฝ์–ด์žˆ๋‹ค ๋ผ๊ณ  ํ•ฉ๋‹ˆ๋‹ค.

์ฃฝ์—ˆ์œผ๋ฉด์„œ ์‚ด์•„์žˆ๋Š” ๊ณ ์–‘์ด

 

์˜ค๋Š˜ ๊ธ€์—์„œ ์†Œ๊ฐœํ•  Fargate (ํŒŒ๊ฒŒ์ดํŠธ) ๋˜ํ•œ ์Šˆ๋ขฐ๋”ฉ๊ฑฐ์˜ ๊ณ ์–‘์ด์™€ ๋น„์Šทํ•œ ๊ฐœ๋…์ž…๋‹ˆ๋‹ค. (๋‚˜๋งŒ ๊ทธ๋ ‡๊ฒŒ ์ƒ๊ฐํ• ์ˆ˜๋„..)

 

 

Fargate ๋Š” ๋ฌด์—‡์ผ๊นŒ?


์šฐ๋ฆฌ๋Š” ๋ณดํ†ต AWS ๋ฅผ ์ด์šฉํ•ด์„œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ๋ฐฐํฌํ•œ๋‹ค๊ณ  ํ•˜๋ฉด EC2 ๋ฅผ ํ†ตํ•ด ์ธ์Šคํ„ด์Šค๋ฅผ ์ƒ์„ฑํ•˜๊ณ , ๊ทธ ์ธ์Šคํ„ด์Šค ๋‚ด๋ถ€์— ์ปจํ…Œ์ด๋„ˆ๋‚˜ ์ง์ ‘ ํ”„๋กœ์„ธ์Šค๋กœ ๋„์šฐ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

 

EC2 ์ธ์Šคํ„ด์Šค ํด๋Ÿฌ์Šคํ„ฐ๋ฅผ ๊ด€๋ฆฌํ•˜๊ณ , ์ธ์Šคํ„ด์Šค ์œ ํ˜•์„ ์„ ํƒํ•˜๊ณ , ์ปจํ…Œ์ด๋„ˆ์˜ ์ผ์ •์„ ๊ด€๋ฆฌํ•˜๊ณ , ํด๋Ÿฌ์Šคํ„ฐ ์‚ฌ์šฉ๋ฅ ์„ ์ตœ์ ํ™”ํ•ด์•ผํ–ˆ์Šต๋‹ˆ๋‹ค.

 

ํ•˜์ง€๋งŒ Fargate ๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ์ด๋Ÿฐ ๋ฒˆ๊ฑฐ๋กœ์šด ์ž‘์—…์—์„œ ๋ฒ—์–ด๋‚  ์ˆ˜ ์žˆ์ฃ .

 

Fargate ๋˜ํ•œ EC2 ์ธ์Šคํ„ด์Šค์ฒ˜๋Ÿผ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์ปจํ…Œ์ด๋„ˆ๋กœ ์‹คํ–‰์‹œ์ผœ์ค๋‹ˆ๋‹ค. ๋‹ค๋งŒ, EC2 ์™€ ๋‹ค๋ฅด๊ฒŒ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‹คํ–‰์‹œ์ผœ์ค„ ์ˆ˜ ์žˆ๋Š” ํ™˜๊ฒฝ์„ ํ”„๋กœ๋น„์ €๋‹ ํ•  ํ•„์š”๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค. ์ฆ‰, Fargate ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๋ฉด ์ธ์Šคํ„ด์Šค ํ”„๋กœ๋น„์ €๋‹ ์—†์ด ๋ฐ”๋กœ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์„ ์ปจํ…Œ์ด๋„ˆ๋กœ ์‹คํ–‰์‹œํ‚ฌ ์ˆ˜ ์žˆ์ฃ .

 

์—ฌ๊ธฐ์„œ ์‚ด์ง ์ด๋Ÿฐ ์˜๋ฌธ์„ ๊ฐ€์งˆ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. 

์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‹คํ–‰ํ•  ๊ฐ€์ƒ ๋จธ์‹ ์ด๋‚˜ ์ปดํ“จํŒ… ๋ฆฌ์†Œ์Šค๊ฐ€ ์—†๋Š”๋ฐ ์–ด๋–ป๊ฒŒ ๊ทธ๊ฒŒ ๊ฐ€๋Šฅํ•˜์ง€?

 

์‚ฌ์‹ค Fargate ๋˜ํ•œ EC2 ์ธ์Šคํ„ด์Šค ์œ„์—์„œ ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์ด ์ธ์Šคํ„ด์Šค๋Š” ์‚ฌ์šฉ์ž๊ฐ€ ์ƒ์„ฑํ•œ ๊ฒƒ์ด ์•„๋‹ˆ๊ณ , AWS ์—์„œ ๊ด€๋ฆฌํ•˜๋Š” ์ธ์Šคํ„ด์Šค์ž…๋‹ˆ๋‹ค. AWS ๊ฐ€ ๊ด€๋ฆฌํ•˜๋Š” ์ธ์Šคํ„ด์Šค ์œ„์—์„œ ์‹คํ–‰๋˜๊ธฐ ๋•Œ๋ฌธ์— ์‚ฌ์šฉ์ž๋Š” ์ธ์Šคํ„ด์Šค๋ฅผ ์‹ ๊ฒฝ ์“ธ ํ•„์š”๊ฐ€ ์—†๋Š” ๊ฑฐ์ฃ .

 

์‚ฌ์šฉ์ž๊ฐ€ ์ธ์Šคํ„ด์Šค๋ฅผ ์ง์ ‘ ๊ด€๋ฆฌ ํ•˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— ๋งˆ์นจ ์ธ์Šคํ„ด์Šค๊ฐ€ ์—†๋Š” ํ™˜๊ฒฝ์—์„œ ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ์‹คํ–‰๋˜๋Š” ๋“ฏํ•œ ๋Š๋‚Œ์„ ์ค๋‹ˆ๋‹ค.

๊ทธ๋ฆฌ๊ณ  ์ด๋Ÿฌํ•œ ๋Š๋‚Œ์„ AWS ์—์„  ์„œ๋ฒ„๋ฆฌ์Šค ๋ผ๊ณ  ์ง€์นญํ•˜์ฃ .

 

๋…ธ๋“œ๊ฐ€ ์žˆ๋Š”๋ฐ์š” ์—†์–ด์š”!

 

๊ทธ๋ž˜์„œ Fargate ๋Š” ์„œ๋ฒ„๋ฆฌ์Šค ์ปจํ…Œ์ด๋„ˆ ์ปดํ“จํŒ… ์—”์ง„์ด๋ผ๊ณ  ๋ณผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Fargate ์™€ ํ•จ๊ป˜๋ผ๋ฉด ์ปจํ…Œ์ด๋„ˆ ์‹คํ–‰์‹œํ‚ค๋Š” ๊ฑด ์‹์€ ์ฃฝ ๋จน๊ธฐ!

 

Fargate ์˜ ์žฅ์ ์€ ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

  • ์„œ๋ฒ„๋ฅผ ๊ด€๋ฆฌํ•˜์ง€ ์•Š๊ณ ๋„ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ๋ฐฐํฌํ•˜๊ณ  ๊ด€๋ฆฌํ•  ์ˆ˜ ์žˆ๋‹ค (์—ฌ๊ธฐ์„œ ์„œ๋ฒ„๋Š” EC2)
  • ECS, EKS ์™€ ํ˜ธํ™˜๋˜๋ฉฐ ํ•„์š”ํ•œ ์ปจํ…Œ์ด๋„ˆ(ํŒŒ๋“œ) ์‚ฌ์–‘์— ๋งž๊ฒŒ ์‹คํ–‰ ๊ฐ€๋Šฅํ•˜๋‹ค
  • ์ธํ”„๋ผ๊ฐ€ ์•„๋‹Œ ์• ํ”Œ๋ ˆ์ผ€์ด์…˜์— ์ง‘์ค‘ํ•  ์ˆ˜ ์žˆ๋‹ค

 

EKS ์—์„œ์˜ Fargate


๊ทธ๋Ÿผ ์‹ค์ œ๋กœ Fargate ๊ฐ€ ์–ด๋–ป๊ฒŒ ๋™์ž‘ํ•˜๋Š” ์ง€ EKS ํ™˜๊ฒฝ์—์„œ ํ™•์ธํ•ด๋ณด์ฃ !

 

๋ ›์ธ ๋‘๋”์ฝ”๋“œ!

 

ํ…Œ์ŠคํŠธ ํ™˜๊ฒฝ

  • Terraform v1.2.7
  • EKS v1.23

 

 

EKS ํ™˜๊ฒฝ์—์„œ Fargate ๋ฅผ ์‚ฌ์šฉํ•˜๋ ค๋ฉด EKS ์—์„œ ํŒŒ๋“œ๋ฅผ ์‹คํ–‰์‹œํ‚ฌ ์ˆ˜ ์žˆ๋„๋ก IAM Role ์„ ์ƒ์„ฑํ•˜๊ณ , ์ด๋ฅผ Role ์„ ๋ถ€์—ฌํ•˜์—ฌ Fargate ํ”„๋กœํ•„์„ ํ™œ์„ฑํ™” ํ•˜๋ฉด ๋ฉ๋‹ˆ๋‹ค.

Fargate ํ”„๋กœํ•„์€ Fargate ๋ฅผ ์ด์šฉํ•˜์—ฌ ํŒŒ๋“œ ๋ฐฐํฌ๋ฅผ ๊ฐ€๋Šฅ์ผ€ ํ•ด์ค€๋‹ค๊ณ  ์ƒ๊ฐํ•˜์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค. ์—ฌ๊ธฐ ์ฐธ๊ณ 

 

ํ…Œ๋ผํผ์œผ๋กœ ์ง„ํ–‰ํ•  ๊ฒƒ์ด๊ธฐ ๋•Œ๋ฌธ์— ๋”ฐ๋กœ AWS ์›น์—์„œ ํ•ด์ค„ ๊ฒƒ์€ ์—†์Šต๋‹ˆ๋‹ค. EKS ๋ชจ๋“ˆ์„ ์ฐธ์กฐํ•˜๋ ค๋ฉด ์—ฌ๊ธฐ !

 

terraform main.tf ์•„๋ž˜์™€ ๊ฐ™์ด Fargate ํ”„๋กœํ•„ ๊ด€๋ จ ๋ถ€๋ถ„์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค.

  # Active Fargate Profile
  fargate_profiles = {
    default = {
      name = "default"
      selectors = [
        {
          namespace = "default"
          labels = {
            WorkerType = "fargate"
          }
        }
      ]

      tags = {
        Owner = "kingbj0429"
      }

      timeouts = {
        create = "20m"
        delete = "20m"
      }
    }
  }

 

์ดํ›„ terraform apply ๋ฅผ ํ†ตํ•ด EKS ์— ์ ์šฉ์‹œ์ผœ๋ณด์ฃ .

 

Fargate ํ”„๋กœํ•„์— ํ•„์š”ํ•œ IAM Role ์ด ์ƒ์„ฑ๋˜์—ˆ๊ณ ,

# module.eks.module.fargate_profile["default"].aws_iam_role_policy_attachment.this["arn:aws:iam::aws:policy/AmazonEKSFargatePodExecutionRolePolicy"] will be created
+ resource "aws_iam_role_policy_attachment" "this" {
    + id         = (known after apply)
    + policy_arn = "arn:aws:iam::aws:policy/AmazonEKSFargatePodExecutionRolePolicy"
    + role       = (known after apply)
  }

# module.eks.module.fargate_profile["default"].aws_iam_role_policy_attachment.this["arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy"] will be created
+ resource "aws_iam_role_policy_attachment" "this" {
    + id         = (known after apply)
    + policy_arn = "arn:aws:iam::aws:policy/AmazonEKS_CNI_Policy"
    + role       = (known after apply)
  }
  
# module.eks.module.fargate_profile["default"].aws_iam_role.this[0] will be created
+ resource "aws_iam_role" "this" {
  + arn                   = (known after apply)
  + assume_role_policy    = jsonencode(
        {
          + Statement = [
              + {
                  + Action    = "sts:AssumeRole"
                  + Effect    = "Allow"
                  + Principal = {
                      + Service = "eks-fargate-pods.amazonaws.com"
                    }
                  + Sid       = ""
                },
            ]
          + Version   = "2012-10-17"
        }
    )
  + create_date           = (known after apply)
  + description           = "Fargate profile IAM role"
  + force_detach_policies = true
  + id                    = (known after apply)
  + managed_policy_arns   = (known after apply)
  + max_session_duration  = 3600
  + name                  = (known after apply)
  + name_prefix           = "default-"
  + path                  = "/"
  + tags                  = {
      + "Owner" = "kingbj0429"
    }
  + tags_all              = {
      + "Owner" = "kingbj0429"
    }
  + unique_id             = (known after apply)

  + inline_policy {
      + name   = (known after apply)
      + policy = (known after apply)
    }
}

 

Fargate ํ”„๋กœํ•„์ด ํ™œ์„ฑํ™”๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

# module.eks.module.fargate_profile["default"].aws_eks_fargate_profile.this[0] will be created
+ resource "aws_eks_fargate_profile" "this" {
  + arn                    = (known after apply)
  + cluster_name           = "eks"
  + fargate_profile_name   = "default"
  + id                     = (known after apply)
  + pod_execution_role_arn = (known after apply)
  + status                 = (known after apply)
  + subnet_ids             = [
      + "subnet-xxxx",
      + "subnet-xxxx",
      + "subnet-xxxx",
      + "subnet-xxxx",
    ]
  + tags                   = {
      + "Owner" = "kingbj0429"
    }
  + tags_all               = {
      + "Owner" = "kingbj0429"
    }

  + selector {
      + labels    = {
          + "WorkerType" = "fargate"
        }
      + namespace = "default"
    }

  + timeouts {
      + create = "20m"
      + delete = "20m"
    }
}

 

๊ทธ๋Ÿผ ์‹ค์ œ๋กœ ์ƒ์„ฑ๋˜์—ˆ๋Š”์ง€ AWS ์›น์—์„œ ํ™•์ธํ•ด๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค.

 

์šฐ์„  ์ƒ์„ฑ๋œ IAM Role ์ž…๋‹ˆ๋‹ค.

Policy ๋Š” AmazonEKS_CNI_Policy ์™€ AmazonEKSFargatePodExecutionRolePolicy ์ž…๋‹ˆ๋‹ค. 

์ด ๋‘๊ฐœ์˜ Policy ๋Š” AWS ๊ด€๋ฆฌํ˜•์ด๊ธฐ ๋•Œ๋ฌธ์— AWS ์—์„œ ์‰ฝ๊ฒŒ ์ •์ฑ… ๋‚ด์šฉ์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

 

์ƒ์„ฑํ•œ IAM Role

 

๊ทธ๋ฆฌ๊ณ  ์ƒ์„ฑ๋œ ํ”„๋กœํ•„์„ ํ™•์ธํ•ด์ค๋‹ˆ๋‹ค.

์ƒ์„ฑ๋œ Fargate Profile

 

ํฌ๋“œ ์„ ํƒ๊ธฐ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค. 

default ๋„ค์ž„์ŠคํŽ˜์ด์Šค์— WorkerType: fargate ๋ ˆ์ด๋ธ”์„ ๊ฐ€์ง„ ํŒŒ๋“œ๋ฅผ ๋ฐฐํฌํ•˜๊ฒŒ ๋˜๋ฉด ์›Œ์ปค๋…ธ๋“œ๊ฐ€ ์•„๋‹Œ Fargate ์—์„œ ์‹คํ–‰๋ฉ๋‹ˆ๋‹ค.

 

ํฌ๋“œ ์„ ํƒ๊ธฐ์™€ ๊ฐ™์€ ๊ตฌ์„ฑ ์š”์†Œ๋ฅผ ํ™•์ธํ•˜๋ ค๋ฉด ์—ฌ๊ธฐ ์ฐธ์กฐ !

ํฌ๋“œ ์„ ํƒ๊ธฐ

 

๋‹ค ์ •์ƒ์ ์œผ๋กœ ์ƒ์„ฑ๋œ ๊ฒƒ ๊ฐ™์œผ๋‹ˆ ํ•œ๋ฒˆ ํŒŒ๋“œ๋„ ์‹คํ–‰ํ•ด๋ณด์ฃ .

 

๋„ค์ž„์ŠคํŽ˜์ด์Šค๋Š” default, WorkerType: fargate ๋ ˆ์ด๋ธ”์„ ๊ฐ€์ง€๋Š” ํŒŒ๋“œ yaml ์ž…๋‹ˆ๋‹ค.

apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: null
  labels:
    run: fargate-pod
    WorkerType: fargate
  name: fargate-pod
spec:
  containers:
  - image: nginx
    name: fargate-pod
    resources: {}
  dnsPolicy: ClusterFirst
  restartPolicy: Always
status: {}

 

ํŠน์ด์ ์ด ์žˆ๋‹ค๋ฉด Node ๊ฐ€ ์›Œ์ปค๋…ธ๋“œ๊ฐ€ ์•„๋‹Œ Fargate ์ž…๋‹ˆ๋‹ค.

EKS ์›น์—์„œ๋„ ๋…ธ๋“œ ์ •๋ณด์— Fargate ๊ฐ€ ๋ณด์ž…๋‹ˆ๋‹ค.

EKS ๋…ธ๋“œ ์›น

 

์ด๋ ‡๊ฒŒ EKS ํด๋Ÿฌ์Šคํ„ฐ ํ™˜๊ฒฝ์— Fargate ๋ฅผ ์‹คํ–‰์‹œ์ผœ๋ณด์•˜์Šต๋‹ˆ๋‹ค.

 

 

์ด์™ธ ์•Œ์•„๋‘๋ฉด ์ข‹์€ ์ •๋ณด


๋ฉ”๋ชจ๋ฆฌ ์ •ํ•˜๊ธฐ

 

vCPU ๋ฐ ๋ฉ”๋ชจ๋ฆฌ ์กฐํ•ฉ์„ ์ง€์ •ํ•˜์ง€ ์•Š์œผ๋ฉด ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๊ฐ€์žฅ ์ž‘์€ ์กฐํ•ฉ(.25 vCPU ๋ฐ 0.5GB ๋ฉ”๋ชจ๋ฆฌ)์ด ์‚ฌ์šฉ๋ฉ๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์ฐธ๊ณ 

...
annotations:
    CapacityProvisioned: 0.25vCPU 0.5GB
...

 

Fargate ์Šคํ† ๋ฆฌ์ง€

 

ํ”„๋กœ๋น„์ €๋‹๋˜๋ฉด Fargate์—์„œ ์‹คํ–‰๋˜๋Š” ๊ฐ pod๊ฐ€ 20GB์˜ ์ปจํ…Œ์ด๋„ˆ ์ด๋ฏธ์ง€ ๊ณ„์ธต ์Šคํ† ๋ฆฌ์ง€๋ฅผ ๋ฐ›์Šต๋‹ˆ๋‹ค. ํฌ๋“œ ์Šคํ† ๋ฆฌ์ง€๋Š” ํœ˜๋ฐœ์„ฑ์ž…๋‹ˆ๋‹ค. pod๊ฐ€ ์ค‘์ง€๋œ ํ›„์—๋Š” ์Šคํ† ๋ฆฌ์ง€๊ฐ€ ์‚ญ์ œ๋ฉ๋‹ˆ๋‹ค.

 

AWS EKS์—์„œ Fargate๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด EBS ๋ณผ๋ฅจ์„ ์ง์ ‘ ๋งˆ์šดํŠธํ•˜๋Š” ๊ฒƒ์€ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ EKS์—์„œ๋Š” Fargate์—์„œ Amazon EFS(Elastic File System)๋ฅผ ๋งˆ์šดํŠธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

Amazon EFS๋Š” ๊ฐ€์šฉ์„ฑ๊ณผ ๋‚ด๊ตฌ์„ฑ์ด ๋›ฐ์–ด๋‚˜๋ฉฐ ๋‹ค์ˆ˜์˜ Fargate ํƒœ์Šคํฌ์—์„œ ๋™์‹œ์— ๊ณต์œ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ ์—ฌ๋Ÿฌ Fargate ํƒœ์Šคํฌ๊ฐ€ ๊ณต์œ ํ•˜๋Š” ๋ฐ์ดํ„ฐ๊ฐ€ ํ•„์š”ํ•œ ๊ฒฝ์šฐ์—๋Š” EFS๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์ด ์ข‹์Šต๋‹ˆ๋‹ค.

๊ทธ๋Ÿฌ๋‚˜ EFS๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๋Š” ๊ฒฝ์šฐ์—๋Š” Fargate ํƒœ์Šคํฌ์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋‹ค๋ฅธ AWS ์Šคํ† ๋ฆฌ์ง€ ์„œ๋น„์Šค์ธ Amazon S3 ๋˜๋Š” Amazon DynamoDB๋ฅผ ๊ณ ๋ คํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋”ฐ๋ผ์„œ, EBS๋ฅผ Fargate์—์„œ ๋งˆ์šดํŠธํ•˜๋ ค๋ฉด Kubernetes ํด๋Ÿฌ์Šคํ„ฐ์—์„œ EBS ๋ณผ๋ฅจ์„ ๋งˆ์šดํŠธํ•˜๊ณ , Fargate๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ์›Œํฌ๋กœ๋“œ์— ๋Œ€ํ•ด ์ด๋ฅผ ์ฐธ์กฐํ•˜๋Š” PV์™€ PVC(Persistent Volume Claim)์„ ๋งŒ๋“ค์–ด์•ผ ํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋‚˜ Fargate๋Š” EC2์™€ ๋‹ฌ๋ฆฌ ์ž‘์—…๋งˆ๋‹ค ๊ณ ์œ ํ•œ ์ธํ”„๋ผ๋ฅผ ๊ฐ–์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์— Fargate์—์„œ EBS๋ฅผ ์ง์ ‘ ๋งˆ์šดํŠธํ•˜๋Š” ๊ฒƒ์€ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

Fargate ํ•˜๋“œ์›จ์–ด ์ •๋ณด

 

GPU ๊ธฐ๋ฐ˜์˜ Fargate

 

์•„์‰ฝ๊ฒŒ๋„ GPU๋Š” ํ˜„์žฌ Fargate์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

 

๋”ฐ๋ผ์„œ GPU ๊ธฐ๋ฐ˜์˜ ๋…ธ๋“œ๋ฅผ Fargate ์ฒ˜๋Ÿผ ์œ ๋™์ ์œผ๋กœ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ๋‹ค๋ฉด Karpenter ๋ฅผ ์ด์šฉํ•˜๋ฉด ๋  ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

 

 

๊ทธ๋Ÿฌ๋ฉด ์˜ค๋Š˜์€ ์—ฌ๊ธฐ๊นŒ์ง€!

profile on loading

Loading...