eks 구축 완료

This commit is contained in:
2022-12-29 00:52:17 +09:00
parent ee0d78b284
commit 2281b27e7a
6 changed files with 67 additions and 20 deletions

View File

@ -4,4 +4,8 @@ output "endpoint" {
output "kubeconfig-certificate-authority-data" {
value = "${aws_eks_cluster.eks-cluster.certificate_authority.0.data}"
}
}
output "cluster_name" {
value = aws_eks_cluster.eks-cluster.name
}

View File

@ -0,0 +1,12 @@
resource "aws_eks_node_group" "eks-ng" {
cluster_name = var.cluster_name
node_group_name = var.node_group_name
node_role_arn = var.iam_role_arn
subnet_ids = var.subnet_list
scaling_config {
desired_size = var.desired_size
max_size = var.max_size
min_size = var.min_size
}
}

View File

View File

@ -0,0 +1,21 @@
variable "node_group_name" {
type = string
}
variable "cluster_name" {
type = string
}
variable "iam_role_arn" {
type = string
}
variable "subnet_list" {
type = list(string)
}
variable "desired_size" {
type = number
}
variable "max_size" {
type = number
}
variable "min_size" {
type = number
}

View File

@ -1,14 +0,0 @@
{
"Version" : "2012-10-17",
"Statement" : [
{
"Effect" : "Allow",
"Principal" : {
"Service" : [
"eks.amazonaws.com"
]
},
"Action" : "sts:AssumeRole"
}
]
}