我是 Terraform 和 Helm 世界的新手!我需要在 AWS EKS 集群上设置 Istio。我能够使用 Terraform 设置 EKS 集群。我正在考虑通过编写 terraform 模块使用 Terraform 在 EKS 集群之上安装 ISTIO。然而,我发现我们可以使用 Helm Chart 在 eks 之上设置 Istio。
有人可以帮我回答我的几个问题吗:
- 我应该使用 Terraform 安装 Istio 吗?如果是,是否有可用的 terraform 模块或我如何编写一个?
- 我应该使用 Helm Chart 安装 Istio 吗?如果是,它的优点和缺点是什么?
- 我需要编写一个管道来在 EKS 集群上安装 Istio。我应该结合使用 terraform 和 Helm 作为提供程序吗?
非常感谢您的宝贵时间。感谢您的所有帮助!
为了扩展 @Chris terraform + helm 提供者的第三个选项,
至于 istio 1.12.0+ 版本,他们官方有一个可用的 helm 仓库:
istio 舵安装 https://istio.io/latest/docs/setup/install/helm/
以及 terraform 的 helm 提供者Terraform 头盔提供商 https://registry.terraform.io/providers/hashicorp/helm/latest/docs允许仅由 terraform 配置的简单设置:
provider "helm" {
kubernetes {
// enter the relevant authentication
}
}
locals {
istio_charts_url = "https://istio-release.storage.googleapis.com/charts"
}
resource "helm_release" "istio-base" {
repository = local.istio_charts_url
chart = "base"
name = "istio-base"
namespace = var.istio-namespace
version = "1.12.1"
create_namespace = true
}
resource "helm_release" "istiod" {
repository = local.istio_charts_url
chart = "istiod"
name = "istiod"
namespace = var.istio-namespace
create_namespace = true
version = "1.12.1"
depends_on = [helm_release.istio-base]
}
resource "kubernetes_namespace" "istio-ingress" {
metadata {
labels = {
istio-injection = "enabled"
}
name = "istio-ingress"
}
}
resource "helm_release" "istio-ingress" {
repository = local.istio_charts_url
chart = "gateway"
name = "istio-ingress"
namespace = kubernetes_namespace.istio-ingress-label.id
version = "1.12.1"
depends_on = [helm_release.istiod]
}
这是为制作做好准备所缺少的最后一步
不再需要使用 null_resource 在本地保存 helm 图表
如果您希望覆盖默认的 helm 值,这里很好地显示了它:,选择相关图表并查看数值
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)