【问题标题】:Kubernetes service usage for NLB from different AWS account来自不同 AWS 账户的 NLB 的 Kubernetes 服务使用情况
【发布时间】:2021-02-18 21:37:35
【问题描述】:

我需要添加具有指向 NLB 的外部名称的 kubernetes 服务(在不同的 AWS 账户中)。 我正在使用 terraform 来实现这一点。 我不确定如何使用 NLB 信息外部名称部分。 有人可以帮忙吗?

   resource "kubernetes_service" "test_svc" {
      metadata {
        name      = "test"
        namespace = var.environment
        labels = {
          app = "test"
        }
      }
      spec {
        type          = "ExternalName"
        **external_name =** 
      }
    }

【问题讨论】:

    标签: amazon-web-services kubernetes dns terraform nlb


    【解决方案1】:

    外部名称的用法如下:

    apiVersion: v1
    kind: Service
    metadata:
      name: my-service
      namespace: prod
    spec:
      type: ExternalName
      externalName: my.database.example.com
    

    尝试将 NLB CNAME 作为外部名称

    【讨论】:

    • 请忽略..我使用大写字符作为 LB 名称。现在已解决。
    • @Kumar 很高兴听到这个消息:)
    猜你喜欢
    • 2018-09-09
    • 1970-01-01
    • 1970-01-01
    • 2017-03-26
    • 2020-04-10
    • 2020-04-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多