简体   繁体   English

来自不同 AWS 账户的 NLB Kubernetes 服务使用情况

[英]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.

相关问题 Kubernetes 服务账户为容器中的不同用户访问 AWS S3 - Kubernetes service account to access AWS S3 for different users in the container Kubernetes 服务账户和 AWS IAM 角色的秘密 - Kubernetes Service Account and AWS IAM Role for Secrets 如何自定义由使用AWS NLB作为TCP服务的Kubernetes LoadBalancer类型服务创建的安全组入口规则 - How to customize the Security Group Ingress Rules created by a Kubernetes LoadBalancer type service that uses AWS NLB for TCP services 我的kubernetes AWS NLB集成无法正常工作 - My kubernetes AWS NLB integration is not working 在service.beta.kubernetes.io/aws-load-balancer-type注释中指定nlb时创建的经典负载均衡器 - Classic load balancer created when specifying nlb in service.beta.kubernetes.io/aws-load-balancer-type annotation 在通过 Kops 在 AWS 中创建的 kubernetes 中创建 nlb-ip 负载均衡器 - Create nlb-ip loadbalancers in kubernetes created in AWS through Kops 从 NLB 到 ALB 的 AWS Pass 流量? - AWS Pass traffic from NLB to an ALB? 为什么 Kube 服务没有将 SSL 证书附加到 AWS NLB? - Why is the Kube service not attaching the SSL certificate to AWS NLB? AWS NLB:基于路径将请求转发到单个主机的不同端口 - AWS NLB: forwarding request to different ports of a single host based on Path Kube.netes 中的 AWS ALB 服务 - AWS ALB service in Kubernetes
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM