我正在尝试在我的本地开发环境中运行 Ambassador API 网关,因此我将模拟我最终将在生产环境中得到的结果 - 不同之处在于,在生产环境中,我的解决方案将在 Kubernetes 中运行。为此,我将 Ambassador 安装到 Docker Desktop 中并添加所需的配置以将请求路由到我的微服务。不幸的是,它对我不起作用,我收到以下错误:
upstream connect error or disconnect/reset before headers. reset reason: connection failure
我认为这是由于映射文件中的问题,如下所示:
apiVersion: ambassador/v2
kind: Mapping
name: institutions_mapping
prefix: /ins/
service: localhost:44332
所以我基本上想要做的是重写所有请求到http://{ambassador_url}/ins
端口上的 IIS Express(通过 Visual Studio)本地运行的服务44332
。
我错过了什么?