[英]Kubernetes service usage for NLB from different AWS account
I have a requirement to add kubernetes Service with an ExternalName pointing to NLB(in a different AWS account).我需要添加带有指向 NLB 的 ExternalName 的 kubernetes 服务(在不同的 AWS 账户中)。 I am using terraform to implement this.我正在使用 terraform 来实现这一点。 I am not sure how to use NLB info external name section.我不确定如何使用 NLB 信息外部名称部分。 Can someone please help?有人可以帮忙吗?
resource "kubernetes_service" "test_svc" {
metadata {
name = "test"
namespace = var.environment
labels = {
app = "test"
}
}
spec {
type = "ExternalName"
**external_name =**
}
}
Usage of external name is as follows:外部名称的用法如下:
apiVersion: v1
kind: Service
metadata:
name: my-service
namespace: prod
spec:
type: ExternalName
externalName: my.database.example.com
Try to put the NLB CNAME as the external name尝试将 NLB CNAME 作为外部名称
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.