URI不是Kubernetes Pod中的绝对调用微服务

时间:2018-09-05 15:42:21

标签: docker kubernetes microservices minikube

我开发了一种微服务,可以在以下位置进行响应:

http://localhost:8080/aggregator?email=myemail@email.com

当我将其运行到 Kubernetes 部署(使用Minikube)并使用负载平衡器服务以将服务公开到外部时,我无法访问它。

这样做:

minikube service aggregator --url

让我回来

http://192.168.99.100:32482

但是在邮递员上,如果我执行GET请求:

http://192.168.99.100:32482/aggregator?email=myemail@email.com

我收到以下错误:

{
  "timestamp": "2018-09-05T15:32:58.269+0000",
  "status": 500,
  "error": "Internal Server Error",
  "message": "URI is not absolute",
  "path": "/"
}

如果我尝试这样做:

http://192.168.99.100:32482/aggregator/#?email=myemail@email.com

它识别出它需要查询参数'email',但不识别它,因为它给了我回信:

{
  "timestamp": "2018-09-05T15:40:23.453+0000",
  "status": 400,
  "error": "Bad Request",
  "message": "Required String parameter 'email' is not present",
  "path": "/aggregator/"
}

我想念什么?

0 个答案:

没有答案