kubernetes Terraform Helm释放错误:AKS上Jaeger算子的CRD缺失

wdebmtf2  于 2023-10-17  发布在  Kubernetes
关注(0)|答案(1)|浏览(124)

我正在尝试使用Terraform在Azure Kubernetes Service(AKS)上设置Jaeger Operator。我在为Jaeger Operator部署Helm版本时遇到了一个问题。我收到的错误消息表明,缺少Jaeger Operator运行所需的自定义资源定义(CRD),特别是与cert-manager相关的。

地形编码:

resource "helm_release" "jaeger_operator" {
  name       = "jaeger-operator"
  repository = "https://jaegertracing.github.io/helm-charts"
  chart      = "jaeger-operator"
  version    = "2.46.2"

  depends_on = [helm_release.elastic]
}

错误信息:

│ Error: unable to build kubernetes objects from release manifest: [resource mapping not found for name: "jaeger-operator-service-cert" namespace: "default" from "": no matches for kind "Certificate" in version "cert-manager.io/v1"
│ ensure CRDs are installed first, resource mapping not found for name: "selfsigned-issuer" namespace: "default" from "": no matches for kind "Issuer" in version "cert-manager.io/v1"
│ ensure CRDs are installed first]
│ 
│   with module.kube.helm_release.jaeger_operator,
│   on ../modules/kube/jaeger.tf line 1, in resource "helm_release" "jaeger_operator":
│    1: resource "helm_release" "jaeger_operator" {
│

我试着在网上寻找解决方案,但我无法找到这个问题的明确解决方案。

qyyhg6bp

qyyhg6bp1#

我用这个terraform代码解决了这个问题:

resource "helm_release" "cert_manager" {
  name       = "cert-manager"
  repository = "https://charts.jetstack.io"
  chart      = "cert-manager"
  version    = "v1.7.1"
  namespace  = var.namespace

  set {
    name  = "installCRDs"
    value = "true"
  }
}

相关问题