kubernetes - 503 Service Unavailable with Ambassador QOTM 服务
问题描述
我在 cent os 中有一个 kubernetes 主/节点设置。将大使设置为 API 网关后,我尝试了一个带有 QOTM 服务的示例路由,当我向该路由发送 http 请求时,我在响应中收到 503 服务不可用,正文为 =“上游没有健康”。但是,当我将它作为独立的 docker 容器运行时,同样的 qotm 服务适用于该路由。在 kubernetes 中设置大使是否需要特别注意。
> kubectl exec ambassador-589c864695-cg556 -- curl -v 10.101.64.22/qotm/*
> no healthy upstream* Trying 10.101.64.22...
> * TCP_NODELAY set
> % Total % Received % Xferd Average Speed Time Time Time Current
> Dload Upload Total Spent Left Speed
> 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* > Connected to 10.101.64.22 (10.101.64.22) port 80 (#0)
> GET /qotm/* HTTP/1.1
> Host: 10.101.64.22
> User-Agent: curl/7.63.0
> Accept: */*
>
< HTTP/1.1 503 Service Unavailable
< content-length: 19
< content-type: text/plain
< date: Fri, 22 Mar 2019 03:54:16 GMT
< server: envoy
<
{ [19 bytes data]
100 19 100 19 0 0 19000 0 --:--:-- --:--:-- --:--:-- 19000
* Connection #0 to host 10.101.64.22 left intact
解决方案
推荐阅读
- java - 无法将 String 解析为 Long 并在列表中使用它
- postgresql - PostgreSQL OID 会随时间变化吗?
- html - CSS 翻译不适用于 flex-box 元素
- python - 如何在不删除(弹出)它的情况下访问 heapq 中的顶部元素 python?
- anaconda - 启动 spyder 时,spyder 内核显示此错误。并且 anaconda 也没有安装其他环境
- mysql - 使用子查询查看单个表中两个表的不同列
- php - PHP 重定向仅在 Chrome 中表现怪异
- xamarin - 如何将图表绑定到列表
在 Xamarin.Forms 中的 XamDataChart 中? - c# - Asp.net core 3.1 用 URL 中的问题 Marq (?) 替换斜杠 (/)
- node.js - Firebase 函数 Node.js 转换流