- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在部署一个面向外部的服务,该服务暴露在节点端口后面,然后暴露在 istio 入口后面。该部署使用手动 sidecar 注入(inject)。一旦部署、nodeport 和 ingress 运行,我就可以向 istio ingress 发出请求。
出于某种未知的原因,请求不会路由到我的部署,而是显示文本“没有健康的上游”。这是为什么,又是什么原因造成的?
我可以在http响应中看到状态代码是503(服务不可用)并且服务器是“envoy”。部署正在运行,因为我可以将端口转发到它,并且一切都按预期工作。
最佳答案
以防万一,像我一样,你会感到好奇......即使在我的场景中,错误的情况很明显......
错误原因: 我有同一服务的两个版本(v1 和 v2),以及使用权重配置了流量路由目标的 Istio VirtualService。然后,95% 进入 v1,5% 进入 v2。当然,由于我还没有部署 v1,所以 95% 的请求都会出现错误“503 - nohealthyupstream”。。
好吧,即便如此,我知道问题所在以及如何修复它(只需部署 v1),我想知道...但是,我如何才能获得有关此错误的更多信息?我怎样才能更深入地分析这个错误以找出发生了什么?
这是一种使用 Istio 配置命令行实用程序 istioctl 进行研究的方法:
# 1) Check the proxies status -->
$ istioctl proxy-status
# Result -->
NAME CDS LDS EDS RDS PILOT VERSION
...
teachstore-course-v1-74f965bd84-8lmnf.development SYNCED SYNCED SYNCED SYNCED istiod-86798869b8-bqw7c 1.5.0
...
...
# 2) Get the name outbound from JSON result using the proxy (service with the problem) -->
$ istioctl proxy-config cluster teachstore-course-v1-74f965bd84-8lmnf.development --fqdn teachstore-student.development.svc.cluster.local -o json
# 2) If you have jq install locally (only what we need, already extracted) -->
$ istioctl proxy-config cluster teachstore-course-v1-74f965bd84-8lmnf.development --fqdn teachstore-course.development.svc.cluster.local -o json | jq -r .[].name
# Result -->
outbound|80||teachstore-course.development.svc.cluster.local
inbound|80|9180-tcp|teachstore-course.development.svc.cluster.local
outbound|80|v1|teachstore-course.development.svc.cluster.local
outbound|80|v2|teachstore-course.development.svc.cluster.local
# 3) Check the endpoints of "outbound|80|v2|teachstore-course..." using v1 proxy -->
$ istioctl proxy-config endpoints teachstore-course-v1-74f965bd84-8lmnf.development --cluster "outbound|80|v2|teachstore-course.development.svc.cluster.local"
# Result (the v2, 5% of the traffic route is ok, there are healthy targets) -->
ENDPOINT STATUS OUTLIER CHECK CLUSTER
172.17.0.28:9180 HEALTHY OK outbound|80|v2|teachstore-course.development.svc.cluster.local
172.17.0.29:9180 HEALTHY OK outbound|80|v2|teachstore-course.development.svc.cluster.local
# 4) However, for the v1 version "outbound|80|v1|teachstore-course..." -->
$ istioctl proxy-config endpoints teachstore-course-v1-74f965bd84-8lmnf.development --cluster "outbound|80|v1|teachstore-course.development.svc.cluster.local"
ENDPOINT STATUS OUTLIER CHECK CLUSTER
# Nothing! Emtpy, no Pods, that's explain the "no healthy upstream" 95% of time.
关于kubernetes - Istio Ingress 导致 "no healthy upstream",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47664397/
我们有一个将导出流量路由到服务网格之外的外部服务的最小示例。 apiVersion: networking.istio.io/v1alpha3 kind: ServiceEntry metadata:
如何在 istio 的目标规则中使用部分匹配的 URI? 试图实现这样的目标: apiVersion: networking.istio.io/v1alpha3 kind: VirtualServic
我看到了Istio site提到速率限制支持,但我只能找到全局速率限制示例。 是否可以在用户级别这样做?例如,如果我的用户登录但在一秒钟内发送超过 50 个请求,那么我想阻止该用户等。在类似情况下,如
这里是 VirtualService 的例子,同时使用了超时和重试。 apiVersion: networking.istio.io/v1alpha3 kind: VirtualService met
这里是 VirtualService 的例子,同时使用了超时和重试。 apiVersion: networking.istio.io/v1alpha3 kind: VirtualService met
场景 我正在使用 Istio 1.5 来自 this question我知道 Istio 使用的默认 envoy 访问日志格式,即 \[%{TIMESTAMP_ISO8601:timestamp}\]
我们已经在开发和生产环境中使用 helm-chart 部署了 Istio 1.11.0。我们在 istio configmap 中使用以下配置,我们已通过 istio-control helm-cha
文档中没有提到主体名称是如何构造的。我所说的主体是指 istio sidecar 创建的客户端证书中的名称,并且可以在规范的 from 指令中的 istio AuthorizationPolicy 对
我目前正在研究 1.6 版的服务网格 Istio。数据平面(Envoy 代理)由控制平面配置。尤其是 Pilot( istiod 的一部分)负责将路由规则和配置传播给特使。我想知道通信是如何工作的?
当用户有多个与之关联的角色时,授权持有者 token 将超过 istio 提供的最大 header 大小,从而阻止所有请求。 授权不记名 token 超过 35,000 个字符,大小为 34K。 如何
我似乎无法找到/理解如何更改 kubernetes 中 Istio 负载均衡器的默认错误登录页面。 例如 503“上游不健康”页面。 是否可以在 Istio 中更改这些?如果是这样,我将如何去做? 提
我知道您可以使用 istio 在服务没有响应时打开断路器。而不是返回 503 , 是否可以重定向到不同的 URL?同样的问题,但是当原始服务返回 500 时,我们可以重定向到另一个 URL 吗? 或者
如何为 Kubernetes 禁用 Istio sidecar 注入(inject) Job ? apiVersion: batch/v1beta1 kind: CronJob metadata:
我正在尝试让 lua envoy 过滤器与 istio 网关一起工作,但我添加到集群并且它正在工作,就好像过滤器不存在一样。 我已经使用本指南在 GKE 上配置了我的 istio 集群 https:/
我想在 kubernetes 集群中运行的不同服务之间实现 TLS 相互身份验证,我发现 Istio 是一个很好的解决方案,无需对代码进行任何更改即可实现这一目标。 我正在尝试使用 Istio sid
我正在尝试让 lua envoy 过滤器与 istio 网关一起工作,但我添加到集群并且它正在工作,就好像过滤器不存在一样。 我已经使用本指南在 GKE 上配置了我的 istio 集群 https:/
我已经使用 Helm 安装了 ISTIO。我忘了启用 grafana、kiali 和 jaeger。安装 istio 后如何启用上述所有服务? 最佳答案 这里是 howto : 来自官方仓库。 你需要
据我了解,无论如何,您的 Istio 网关前都会有一个 NLB 或 ALB? 但我很困惑,因为 Istio Gateway 似乎为 ALB 为第 7 层甚至更多做了很多事情? 所以我读了 ALB ->
我正在使用 helm 安装带有 --set grafana.enabled=true 的 istio-1.0.0 版本. 要访问 grafana 仪表板,我必须使用 kubectl 进行端口转发命令。
我已经使用 Helm 安装了 ISTIO。我忘了启用 grafana、kiali 和 jaeger。安装 istio 后如何启用上述所有服务? 最佳答案 这里是 howto : 来自官方仓库。 你需要
我是一名优秀的程序员,十分优秀!