f-lab-clone / ticketing-infra

[2023] Ticketing Service - PerformanceTest, Terraform, EKS, Grafana
https://github.com/f-lab-clone/ticketing-backend
7 stars 2 forks source link

Private Subnet Node Group 구성 #61

Closed junha-ahn closed 1 year ago

junha-ahn commented 1 year ago

Description

Public Subnet Node Group, Private Subnet Node Group을 구성합니다.

46 이슈에서 실패했었습니다.

private subnet node 할당 문제로 일단 public subnet에 배치

To do

  eks_managed_node_groups = {
    ingress = {
      desired_size = 1
      min_size     = 1
      max_size     = 1

      labels = {
        role = "ingress"
      }

      instance_types = ["t2.small"]
      capacity_type  = "SPOT"

      subnet_ids = module.vpc.public_subnets
    }
    backend = {
      desired_size = 3
      min_size     = 3
      max_size     = 3

      labels = {
        role = "backend"
      }

      instance_types = ["t2.small"]
      capacity_type  = "SPOT"

-      subnet_ids = module.vpc.public_subnets
+      subnet_ids = module.vpc.private_subnets
    }
  }

Test Checklist

junha-ahn commented 1 year ago

노드 그룹 생성 실패에 대한 답변

https://stackoverflow.com/questions/64515585/aws-eks-nodegroup-create-failed-instances-failed-to-join-the-kubernetes-clust

수정

# vpc.tf
module "vpc" {
  ...
+  enable_nat_gateway = true
}
junha-ahn commented 1 year ago
image

Nat 문제로 Public Subnet 으로 변경