IstIO 出口网关出现 HTTP 503 错误

2023-12-11

我有以下用于部署 IstIO 出口网关路由的清单:

---
apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
  name: REDACTED-egress-se
spec:
  hosts:
  - sahfpxa.REDACTED
  ports:
  - number: 8080
    name: http-port
    protocol: HTTP
  resolution: DNS
---
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: sahfpxa-REDACTED-egress-gw
spec:
  selector:
    istio: egressgateway
  servers:
  - port:
      number: 8080
      name: http
      protocol: HTTP
    hosts:
    - sahfpxa.REDACTED
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: egressgateway-for-sahfpxa-REDACTED
spec:
  host: istio-egressgateway.istio-system.svc.cluster.local
  subsets:
  - name: sahfpxa
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: direct-sahfpxa-REDACTED-through-egress-gateway
spec:
  hosts:
  - sahfpxa.REDACTED
  gateways:
  - REDACTED/REDACTED-egress-gw
  - mesh
  http:
  - match:
    - gateways:
      - mesh
      port: 8080
    route:
    - destination:
        host: istio-egressgateway.istio-system.svc.cluster.local
        subset: sahfpxa
        port:
          number: 80
      weight: 100
  - match:
    - gateways:
      - REDACTED/sahfpxa-REDACTED-egress-gw
      port: 8080
    route:
    - destination:
        host: sahfpxa.REDACTED
        port:
          number: 8080
      weight: 100

但我收到来自受影响命名空间的 sidecar istio-proxy 容器 Pod 的连接被拒绝,以及来自该命名空间中的工作负载容器的 HTTP 503 错误。

任何想法配置可能有什么问题或者我如何调试它?

提前致谢。

此致, 福尔伯格


您的部署清单中几乎没有错误,例如DestinationRule没有指着你的ServiceEntry.

您可以尝试将您的清单文件与这些清单文件相匹配:

apiVersion: networking.istio.io/v1alpha3
kind: ServiceEntry
metadata:
  name: etth
spec:
  hosts:
  - etth.pl
  ports:
  - number: 8080
    name: http-port
    protocol: HTTP
  resolution: DNS
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
  name: istio-egressgateway
spec:
  selector:
    istio: egressgateway
  servers:
  - port:
      number: 80
      name: http
      protocol: HTTP
    hosts:
    - etth.pl
---
apiVersion: networking.istio.io/v1alpha3
kind: DestinationRule
metadata:
  name: egressgateway-for-cnn
spec:
  host: istio-egressgateway.istio-system.svc.cluster.local
  subsets:
  - name: etth
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: direct-cnn-through-egress-gateway
spec:
  hosts:
  - etth.pl
  gateways:
  - istio-egressgateway
  - mesh
  http:
  - match:
    - gateways:
      - mesh
      port: 80
    route:
    - destination:
        host: istio-egressgateway.istio-system.svc.cluster.local
        subset: etth
        port:
          number: 80
      weight: 100
  - match:
    - gateways:
      - istio-egressgateway
      port: 80
    route:
    - destination:
        host: etth.pl
        port:
          number: 8080
      weight: 100

您可以检查路由是否存在于:istioctl pc routes $(kubectl get pods -l istio=egressgateway -o jsonpath='{.items[0].metadata.name}' -n istio-system).istio-system -o json

$ istioctl pc routes $(kubectl get pods -l istio=egressgateway -o jsonpath='{.items[0].metadata.name}' -n istio-system).istio-system -o json
[
    {
        "name": "http.80",
        "virtualHosts": [
            {
                "name": "etth.pl:80",
                "domains": [
                    "etth.pl",
                    "etth.pl:80"
                ],
                "routes": [
                    {
                        "match": {
                            "prefix": "/",
                            "caseSensitive": true
                        },
                        "route": {
                            "cluster": "outbound|8080||etth.pl",
                            "timeout": "0s",
                            "retryPolicy": {
                                "retryOn": "connect-failure,refused-stream,unavailable,cancelled,resource-exhausted,retriable-status-codes",
                                "numRetries": 2,
                                "retryHostPredicate": [
                                    {
                                        "name": "envoy.retry_host_predicates.previous_hosts"
                                    }
                                ],
                                "hostSelectionRetryMaxAttempts": "5",
                                "retriableStatusCodes": [
                                    503
                                ]
                            },
                            "maxGrpcTimeout": "0s"
                        },
                        "metadata": {
                            "filterMetadata": {
                                "istio": {
                                    "config": "/apis/networking/v1alpha3/namespaces/default/virtual-service/direct-cnn-through-egress-gateway"
                                }
                            }
                        },
                        "decorator": {
                            "operation": "etth.pl:8080/*"
                        },
                        "typedPerFilterConfig": {
                            "mixer": {
                                "@type": "type.googleapis.com/istio.mixer.v1.config.client.ServiceConfig",
                                "disableCheckCalls": true,
                                "mixerAttributes": {
                                    "attributes": {
                                        "destination.service.host": {
                                            "stringValue": "etth.pl"
                                        },
                                        "destination.service.name": {
                                            "stringValue": "etth.pl"
                                        },
                                        "destination.service.namespace": {
                                            "stringValue": "default"
                                        }
                                    }
                                },
                                "forwardAttributes": {
                                    "attributes": {
                                        "destination.service.host": {
                                            "stringValue": "etth.pl"
                                        },
                                        "destination.service.name": {
                                            "stringValue": "etth.pl"
                                        },
                                        "destination.service.namespace": {
                                            "stringValue": "default"
                                        }
                                    }
                                }
                            }
                        }
                    }
                ]
            }
        ],
        "validateClusters": false
    },
    {
        "virtualHosts": [
            {
                "name": "backend",
                "domains": [
                    "*"
                ],
                "routes": [
                    {
                        "match": {
                            "prefix": "/stats/prometheus"
                        },
                        "route": {
                            "cluster": "prometheus_stats"
                        }
                    }
                ]
            }
        ]
    }
]
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

IstIO 出口网关出现 HTTP 503 错误 的相关文章

随机推荐

  • JSONObject 无法转换为 JSONArray

    我的 Android 应用程序需要使用以下 Java 从我的 WCF 服务获取用户名数组 然后填充微调器 JSONArray mtUsers new JSONArray new String buffer 但当我收到以下错误时 它似乎正在获
  • 在android上使用smsManager.sendTextManager发送短信的问题

    我正在从我的应用程序向使用 5 位数手机号码的服务器发送一条短信 在 4 2 2 操作系统上 它会在下面弹出窗口询问我 Edited 问 如何处理取消 确定按钮 这应该有效 switch getResultCode if cancel pr
  • 删除目录中的所有文件和文件夹

    我想要一个批处理文件 该文件将删除我的无线工具包的缓存文件夹中的所有文件夹和文件 目前我有以下内容 cd C Users tbrollo j2mewtk 2 5 2 appdb RMS del db 这将删除我的所有 db 文件RMS目录
  • fwrite() 性能远低于磁盘容量

    我有一个动态分配的数组struct拥有 1700 万个元素 为了将其保存到磁盘 我写 fwrite StructList sizeof Struct NumStructs FilePointer 在稍后的步骤中 我用等效的内容阅读了它fre
  • 在 Tensorflow 中重用 LSTM 的重用变量

    我正在努力使RNN using LSTM 我做了LSTM模型 后面有两个DNN网络和一个回归输出层 我训练了我的数据 最终的训练损失约为0 009 然而 当我将模型应用于测试数据时 损失变为大约0 5 第 1 轮训练损失约为0 5 所以 我
  • Jquery 从文本中提取 URL

    我需要使用 jquery 从文本中提取 URL 可以说我在页面上的某个地方遵循文本区域代码
  • 多视图应用程序的knockoutjs模式示例[关闭]

    Closed 这个问题不符合堆栈溢出指南 目前不接受答案 我正在构建一个应用程序 其中包含两个复杂的 显着不同的 但具有一些共享组件 视图 一个视图允许用户运行查询并查看搜索结果 另一个视图提供最近活动的概述 相关示例可能是具有电子邮件屏幕
  • Android Studio-Java.exe 已完成,退出值非零 2

    当我尝试运行我的应用程序时 我收到此错误 Error Execution failed for task app dexDebug gt com android ide common process ProcessException org
  • 在 Ajax Adob​​e AIR 应用程序中与 API 共享机密

    我对开发 AIR 应用程序还很陌生 所以也许这是一个愚蠢的问题 但我似乎无法从 Google 找到任何答案 非常感谢您能给我的任何帮助 我正在使用 Ajax 构建一个 AIR 应用程序 使用的 API 与 flickr 的 API 相同 并
  • Google 地图地理编码(GLatLng 地址)

    我正在尝试使用 Google Maps JavaScript API 从两个位置绘制测地折线address点 var polyOptions geodesic true var polyline new GPolyline new GLat
  • 无法写入从两个压缩数据帧创建的 PySpark 数据帧

    我正在尝试跟随这里给出的例子用于组合两个数据框没有共享连接密钥 通过数据库表或 pandas 数据框中的 索引 进行组合 但 PySpark 没有该概念 My Code left df left df repartition right d
  • 安装了 Ruby on Rails,但是当我尝试运行 Rails Sever 时它没有加载 WEBrick?

    我今天在我的 mac 上安装了 Ruby on Rails 以及 Gems 和 MYsql 我正在尝试遵循 lynda com 教程 但遇到了困难 当我尝试运行 Rails 服务器时 由于某种原因它没有加载 WEBrick 这是我得到的错误
  • Pandas Dataframe - 根据两列找到最小值但大于0的行

    我有一个包含 3 列的数据框 x y 时间 有几千行 我想要做的是检索时间最短的行 但我希望最小值不应该为 0 e g x y time 240 1 28 5 240 2 19 3 240 240 0 240 19 9 7 到目前为止我已经
  • dyld:找不到符号:__TMPdCSs12AnyGenerator

    当我尝试构建并运行我的项目时 它给了我一个错误symbol not found TMPdCSs12AnyGenerator 我已经在我的系统上安装了 Xcode 7 beta 当我安装时它给我一个错误未找到领域模块所以我只是删除了领域框架
  • 如何对合并光标进行排序?

    任务是将来自 2 个具有相似列的不同表的数据组合起来 并按一列排序 看起来 MergeCursor 可能会有所帮助 但不知道如何对项目进行排序 我现在看到的唯一解决方案是手动转换为 ArrayAdapter 或者进行偷偷摸摸的 JOIN 尚
  • 为什么只允许UI线程修改UI?

    我知道 如果我从不同的线程修改控件 我应该小心 因为 WinForms 和 WPF 不允许从其他线程修改控件的状态 为什么会有这样的限制 如果我可以编写线程安全代码 我应该能够安全地修改控件状态 那么为什么会有这样的限制呢 一些 GUI 框
  • 如何获取从 FileProvider 类获取的图像文件的方向?

    背景 针对API 24或更高版本 开发人员需要使用FileProvider 或他们自己的ContentProvider 而不是使用简单的 Uri fromFile 命令 以便让其他应用程序访问该应用程序的文件 问题 我尝试使用以下代码打开相
  • MySQL 查询使用 JOIN 不使用 INDEX

    我在 MySQL 简化 中有以下两个表 clicks InnoDB 包含约 70 000 000 条记录 有一个索引date added column 有专栏link id它指的是记录links table links MyISAM 包含的
  • Jetty 9(嵌入式):在运行时添加处理程序

    有没有办法将处理程序添加到正在运行的嵌入式 Jetty 实例 我们已将旧的基于 Jetty 6 的项目迁移到 Jetty 9 我们的插件系统需要能够添加和删除动态处理程序 请参阅下面的示例 Server server new Server
  • IstIO 出口网关出现 HTTP 503 错误

    我有以下用于部署 IstIO 出口网关路由的清单 apiVersion networking istio io v1alpha3 kind ServiceEntry metadata name REDACTED egress se spec