简体   繁体   English

使用 Terraform 部署 AWS EKS Fargate

[英]Deploy AWS EKS Fargate with Terraform

I would like to create an AWS EKS Fargate cluster with Terraform, but in the provider I only see the possibility to create a Fargate profile.我想使用 Terraform 创建一个AWS EKS Fargate 集群,但在提供商中我只看到了创建 Fargate 配置文件的可能性。 Therefore I need to manage the node groups, which is something that I don't want to do.因此我需要管理节点组,这是我不想做的事情。 In the end, I would like the same behaviour of this eksctl command:最后,我想要这个 eksctl 命令的相同行为:

eksctl create cluster --name my-cluster --version 1.14 --fargate

I've managed to get an AWS EKS cluster working fully with Fargate and managed by Terraform.我已经设法让 AWS EKS 集群完全与 Fargate 一起工作并由 Terraform 管理。 Here is the eks.tf file that does it:这是执行此操作的 eks.tf 文件:

https://github.com/Linaro/qa-reports.linaro.org/blob/9dfa8673259971c78311f5e9ec1cd1ab05a6e75e/terraform/shared/eks.tf https://github.com/Linaro/qa-reports.linaro.org/blob/9dfa8673259971c78311f5e9ec1cd1ab05a6e75e/terraform/shared/eks.tf

I gotta say that this took me a while to figure out and terraform scripts got a bit too scary, but I think this might help you out.我得说这花了我一段时间才弄明白,而且 terraform 脚本有点太可怕了,但我认为这可能会对你有所帮助。

use this Terraform module: https://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest使用此 Terraform 模块: https ://registry.terraform.io/modules/terraform-aws-modules/eks/aws/latest

Currently, I have many production EKS clusters running on it with node-groups as well as with Fargate.目前,我有许多生产 EKS 集群在其上运行,带有节点组和 Fargate。

Regards问候

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM