我是 Terraform 和 Helm 世界的新手!我需要在 AWS EKS 集群上设置 Istio。
我正在尝试使用 Terraform 和 Helm 作为提供程序在 EKS 集群之上安装 Istio:
以下是相同的 terraform 代码:
resource "kubernetes_namespace" "istio-system" {
metadata {
annotations = {
name = "istio-namespace"
}
labels = {
mylabel = "label-value"
}
name = "istio-namespace"
}
}
resource "helm_release" "istio_base" {
name = "istio-base"
chart = "./manifests/charts/base"
namespace = "istio-system"
}
resource "helm_release" "istiod" {
name = "istiod"
chart = "./manifests/charts/istio-control/istio-discovery"
namespace = "istio-system"
}
resource "helm_release" "istio-ingress" {
name = "istio-ingress"
chart = "./manifests/charts/gateways/istio-ingress"
namespace = "istio-system"
}
resource "helm_release" "istio-egress" {
name = "istio-ingress"
chart = "./manifests/charts/gateways/istio-egress"
namespace = "istio-system"
}
有人可以帮我回答我的几个疑问:最佳答案
是的,您还必须创建 IAM 角色,如果您想为工作人员创建它,您也可以为其创建 IAM。
resource "aws_iam_role" "eksproject-cluster" {
name = "terraform-eks-eksproject-cluster"
assume_role_policy = <<POLICY
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "eks.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
POLICY
}
https://github.com/prabhatpankaj/eks-terraform-istio但如果您是 EKS 的管理员,则不需要创建 IAM,您可以直接设置 istio
helm template istio-1.1.4/install/kubernetes/helm/istio --name istio --namespace istio-system --set grafana.enabled=true --set tracing.enabled=true --set kiali.enabled=true --set kiali.dashboard.secretName=kiali --set kiali.dashboard.usernameKey=username --set kiali.dashboard.passphraseKey=passphrase | kubectl apply -f -
Let's say in the future I need to change some default value provided by helm chart How can I change those values? Let's say changing memory from 3072Mi to 4000Mi
你可以使用 Helm 做同样的事情
将值更新为 values.yaml 并运行命令
helm upragde istio -f values.yaml
How can I enable mTLS using helm chart in Istio?
对于服务之间或命名空间级别的 mTLS,您可能需要配置其他 YAML,或者您编辑图表应用这些新 YAML 作为 helm 的一部分。
spec:
mtls:
mode: STRICT
Installing add-on for example Kali using helm chart?
它已经是掌 Helm 的一部分
helm template istio-1.1.4/install/kubernetes/helm/istio --name istio --namespace istio-system --set grafana.enabled=true --set tracing.enabled=true --set kiali.enabled=true --set kiali.dashboard.secretName=kiali --set kiali.dashboard.usernameKey=username --set kiali.dashboard.passphraseKey=passphrase | kubectl apply -f -
--set kiali.enabled=true 覆盖命令中的默认值。
关于kubernetes - 使用 Terraform 和 Helm 在 EKS 集群上安装 Istio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67057466/