gpt4 book ai didi

amazon-web-services - 如何设置 AWS EKS 节点使用 gp3

转载 作者:行者123 更新时间:2023-12-05 04:26:40 26 4
gpt4 key购买 nike

我正在尝试将我的 EKS 节点设置为使用 gp3 作为卷。它使用默认的 gp2,但我想将其更改为 gp3。我正在使用 terraform 构建基础设施和 aws_eks_cluster 资源(我没有使用 module "eks")。这是一个简单的片段:

resource "aws_eks_cluster" "cluster" {
name = var.name
role_arn = aws_iam_role.cluster.arn
version = var.k8s_version
}


resource "aws_eks_node_group" "cluster" {
capacity_type = var.node_capacity_type
cluster_name = aws_eks_cluster.cluster.name
disk_size = random_id.node_group.keepers.node_disk
instance_types = split(",", random_id.node_group.keepers.node_type)
node_group_name = "${var.name}-${local.availability_zones[count.index]}-${random_id.node_group.hex}"
node_role_arn = random_id.node_group.keepers.role_arn
subnet_ids = [var.private ? aws_subnet.private[count.index].id : aws_subnet.public[count.index].id]
version = var.k8s_version
}

我尝试设置 kubernetes_storage_class 资源,但它仅针对 pod (PV/PVC) 使用的卷进行更改。我想将节点音量更改为 gp3。

我没有在文档和 github 中找到如何做到这一点。有人能做到吗?

谢谢。

最佳答案

您可以尝试设置您的 own launch template然后在 aws_eks_node_group - launch_template 中引用它争论。

启动模板允许您配置 disk type . AWS 提供 guide关于如何正确编写启动模板。

关于amazon-web-services - 如何设置 AWS EKS 节点使用 gp3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72987296/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com