- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我在 AWS EKS 托管的 Kubernetes 集群中部署了 Istio。这创建了一个名为 istio-ingressgateway 的 LoadBalancer 类型的 Kubernetes 服务,外部主机名为 [redacted]-redacted.us-west-2.elb.amazonaws.com
,并自动预置一个 AWS ELB,输入经典。那太棒了。 (注意:在 AWS 控制台中,我没有看到此 elb 主机名的托管区域,看起来我无法配置别名或诸如此类的东西)
我已经能够通过定义一个 istio 网关将在集群外运行的 gRPC 客户端连接到在集群中运行的 gRPC 服务器,该网关将端口 80 打开到 host:"*"
。 ,并定义一个 istio 虚拟服务,它将端口 80 路由到我的目的地(某些 kubernetes 服务的某个端口)。到现在为止还挺好。
现在我想为集群中的第二个 gRPC 端点执行此操作。据我所知,我的选择是:要么通过在入口上打开第二个端口(比如 81)来路由(我现在选择不这样做)。或者通过定义 [redacted]-redacted.us-west-2.elb.amazonaws.com
的子域来路由,或通过实现“虚拟主机”路由,即客户端发送的同一域上的两个服务 host:"svc1"
在标题中。
这就是我被困的地方。不知道怎么给这个ELB域名定义子域,也不知道能不能用TLS做虚拟主机,如果能,还能不能用Istio的“passthrough”tls模式,以免TLS 在网关上终止。
1- 使用子域:当在我的开发机器上时,我尝试 getent hosts svc1.[redacted]-redacted.us-west-2.elb.amazonaws.com
它不映射到 IP,而如果删除 svc1
前缀 DNS 返回 3 个 IP(猜测 us-west-2 中的 3 个可用区)。所以我不能在没有一些工作的情况下为域添加 svc1 前缀。
我可以定义子域吗svc1
和 svc2
对于通过部署 Istio 自动配置的经典 AWS ELB 创建的域,如果是这样,如何?我可以用 kubectl/istioctl
做这个吗?配置 Istio,还是我需要使用 AWS CLI 执行此操作?这可以在不注册域的情况下完成吗,我对用户不友好的 elb.amazonaws.com 主机名没问题?
2- 虚拟主机:或者,我可以在 gRPC 元数据中添加一个 host=svc1。我尝试添加 ctx := metadata.AppendToOutgoingContext(context.Background(), "Host", "svc1")
对我的 Go 客户来说,那没有用。
一些指导会很棒。
更新 1,一种明文解决方案
我正在阅读 List of HTTP header fields HTTP2 中不应使用“Host” header 。鉴于这是 gRPC,它是 HTTP2,因此我不应该将它添加为我的 gRPC 客户端请求中的自定义 header 。做虚拟主机时的解决方法,在gRPC客户端,不是发送“host”header,而是发送“:Authority”header,该值必须对应istio的gateway+virtualservice中指定的host。这对我有用。在我的 Go 客户端中,我必须添加 dialOptions = append(dialOptions, grpc.WithAuthority("[my-service-1]"))
.
根据 GoDoc grpc.WithAuthority,该解决方案不适用于 TLS .所以我仍然需要找到在使用 TLS 时如何从相同的外部 IP 和端口路由 2 个服务。
更新 1.1:
在虚拟主机中,当使用 TLS 时,SNI 可以在 CLIENT HELLO 消息中传递,而不是像纯文本那样作为 gRPC header 。根据您的语言,确切的 API 会有所不同,但在 Go 中,我可以通过设置 ServerName
来传递主机名。字段在 tls.Config .然后,您可以在 istio 网关配置中对该主机名进行门控,并根据您的 istio 虚拟服务中的该值进行路由。
更新 2:我尝试在 AWS Route53 上创建子域,但失败了。首先,我为域创建一个公共(public)托管区域:[redacted]-redacted.us-west-2.elb.amazonaws.com。接下来,在该托管区域中,我创建了一个名称= svc1.
的 A 记录。 [redacted]-redacted.us-west-2.elb.amazonaws.com,route=Classic Load Balancer 的别名,region=us-west-2,负载均衡器=dualstack.[redacted]-redacted.us-west-2 .elb.amazonaws.com。
我后来测试了 svc1.[redacted]-redacted.us-west-2.elb.amazonaws.com 记录存在于 dig
,它不会返回答案。然而,dig 确实返回了 [redacted]-redacted.us-west-2.elb.amazonaws.com(没有 svc1 前缀)的 3 个 A 记录,以及 3 个负载均衡器的 IP。
最佳答案
伊斯蒂奥
Can I define subdomains svc1 and svc2 for a domain created by classic AWS ELB automatically provisioned by deploying Istio, and if so how?
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: mipnw-vs1
spec:
hosts:
- svc1.example.com
http:
- name: "svc1-route"
match:
- uri:
prefix: /
route:
- destination:
host: svc1.default.svc.cluster.local
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: mipnw-vs2
spec:
hosts:
- svc2.example.com
http:
- name: "svc2-route"
match:
- uri:
prefix: /
route:
- destination:
host: svc2.default.svc.cluster.local
aws
I would love to learn how to create 2 subdomains "abc" and "def" for domain "[redacted]-[redacted].us-west-2.elb.amazonaws.com"
Amazon Route 53 is a highly available and scalable cloud Domain Name System (DNS) web service. It is designed to give developers and businesses an extremely reliable and cost effective way to route end users to Internet applications by translating names like www.example.com into the numeric IP addresses like 192.0.2.1
If you host a website on multiple Amazon EC2 instances, you can distribute traffic to your website across the instances by using an Elastic Load Balancing (ELB) load balancer. The ELB service automatically scales the load balancer as traffic to your website changes over time. The load balancer also can monitor the health of its registered instances and route domain traffic only to healthy instances.
To route domain traffic to an ELB load balancer, use Amazon Route 53 to create an alias record that points to your load balancer. An alias record is a Route 53 extension to DNS. It's similar to a CNAME record, but you can create an alias record both for the root domain, such as example.com, and for subdomains, such as www.example.com. (You can create CNAME records only for subdomains.)
Amazon Route 53 also offers alias records, which are an Amazon Route 53-specific extension to DNS. You can create alias records to route traffic to selected AWS resources, including Amazon Elastic Load Balancing load balancers, Amazon CloudFront distributions, AWS Elastic Beanstalk environments, API Gateways, VPC interface endpoints, and Amazon S3 buckets that are configured as websites. Alias record typically have a type of A or AAAA, but they work like a CNAME record. Using an alias record, you can map your record name (example.com) to the DNS name for an AWS resource(elb1234.elb.amazonaws.com). Resolvers see the A or AAAA record and the IP address of the AWS resource.
Can I use 'Alias' records with my sub-domains?
Yes. You can also use Alias records to map your sub-domains (www.example.com, pictures.example.com, etc.) to your ELB load balancers, CloudFront distributions, or S3 website buckets.
关于amazon-web-services - 我可以为由 Istio 配置的经典 AWS ELB 定义子域吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64037625/
这似乎与子网/可用区有关,但我是使用 VPC 的新手,它让我望而却步。 专有网络:10.80.0.0/16 子网:10.80.1.0/24 (us-east-1b) 子网:10.80.2.0/24 (
我想向 ELB 后面的所有实例发送更新。我更喜欢发送更新而不是从实例端轮询。是否可以向 ELB 发送将广播到所有实例的消息? 最佳答案 不直接,不。 一种编程解决方法是查询 ELB API 以发现健康
(我试图了解 ELB 网络如何在 VPC 中工作,并发布此问题) 当我们向公共(public) ELB 添加两个子网时,aws elb create-load-balancer --load-bala
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 去年关闭。 Improve this
我目前将我的 Web 应用程序托管在 AWS 上,我使用两个 ELB 实例,一个用于对应用服务器的前端请求进行负载均衡,另一个用于对从应用服务器到 API 服务器的后端请求进行负载均衡,像这样(抱歉糟
对于我的堆栈,我需要自动检索 AWS 上负载均衡器的 dns,因为我删除/创建以更新我的堆栈和服务器,名称一直在变化,或者我需要能够自动检索 dns来 self 在 AWS 中的 ELB 谢谢 最佳答
有谁知道带 SSL 的 AWS ELB 在幕后是如何工作的?在我的 ELB 域名上运行 nslookup,我得到 4 个唯一的 IP 地址。如果我的 ELB 启用了 SSL,AWS 是否可以与其他启用
在亚马逊的“经典负载均衡器”上,您可以创建一个规则来将 HTTPS 连接转发到 HTTP,通过将证书上传到负载均衡器并让服务器只处理 http 来简化 SSL 和服务器配置。 我现在正在尝试使用 Am
免责声明: 本主题适用于 HTTP 流量(在 Linux 平台上)。对于以下问题,ELB 可能有一个很好的解决方案(每个人都价格合理)。但到目前为止我找不到任何东西。这就是为什么我需要专家的建议。 问
ELB:弹性负载均衡器 ALB:应用程序负载均衡器 我正在尝试将 aws 上的 elb/alb 映射到另一个 elb(例如: http://my-elb-domain.com ), elb/alb -
我知道 Apigee 可以将请求转发/负载均衡到目标服务器。但是各种云提供商都出售他们的负载均衡器,如果在我的后端应用程序中,我只是公开 API 并且我使用 apigee 边缘,为什么我需要这些负载均
我想知道是否可以使用 CF 堆栈未导出的现有 ELB 在新的 CFT 中引用并在生成的 CF 堆栈中使用。唯一的在线资源似乎是现有的 CFT 需要导出 ELB,以便新的 CFT 导入它。然而,新的 C
我通过使用 ELB、自动缩放、RDS 和 ELB 外部的一个 Node ec2 实例在 AWS 上创建了一个架构(希望它不会错)。现在我不明白,我可以如何在此架构上实现 SSL。 让我简要解释一下:
我在两个 Ubuntu 实例中使用 Tomcat,它们位于 Amazon Web Services 云中的 ELB(弹性负载均衡器)后面。每个 Tomcat 安装在同一个引擎中都有多个虚拟主机。 EL
我已经配置了一个带有 443 HTTPS 端口的 AWS ELB 来支持 Https 传入请求。但是,我想从 ELB 指向一个目标 EC2,它有一个在端口 80 上运行的 tomcat 服务器,没有任
我在使用 ELB 的 aws 上有一个主节点和两个辅助节点。阅读和写作的最佳实践是什么? 1)我是否创建一个包含所有节点的单个LB,主节点和次节点都在ELB中,让python(pymongo)处理排序
我们有一组 EC2 服务器的多个 SSL 证书(由于旧版限制)。我们有多个 ELB 指向该组,每个 ELB 终止特定证书的 SSL。我们现在想要转向自动扩展,而不是硬编码的 EC2 实例列表。单个自动
mod_pagespeed 重写了我的 css 链接 链接 href="/css/file.css"rel="样式表" 类似于: 链接 href="http://example.com/css/fil
在此正则表达式中,https://regex101.com/r/SzzJDE/7如何对 __utm.gif 进行分组 我有 \"(\S+)\s+\w+:\/\/([\w\-\.]*):\S+(\/\S
我有一个发布请求,它将触发服务器代码以在所有实例的内存中缓存数据。所以我需要通过nginx将此请求路由到所有实例。是否可以在 ELB 中配置它? 最佳答案 不,这在 ELB 中是不可能的。我建议要么使
我是一名优秀的程序员,十分优秀!