0

I have a kubernetes master/node setup in cent os. After setting up ambassador as an API gateway, I have tried a sample route with QOTM service for which when I send a http request to the route, I receive 503 Service unavailable in the response with body as = "no healthy upstream". But the same qotm service when I ran it as a stand alone docker container it worked for the route. Is there any thing specific to be taken care in kubernetes to setup ambassador.

 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
Jenny D
  • 27,358
  • 21
  • 74
  • 110

2 Answers2

0

It happens generally when route service can't find host to redirect your request. It can be cause of even any simple typo or wrong on service/route configurations.

I would suggest you to check your service and route yaml files carefully, or just sharing manifests on your original post also can be helpful for you to get solution faster.

Note that Kubernetes doesn't recognize config error inside annotiation of service, so you will not see error when applying manifests.

But you can check logs for ambassador pods. Firstly list pods:

kubectl get pods -l service=ambassador

And then check logs of any of this pod to see if there is an error via

kubectl  logs -f ambassador-7784c84f8f-6wmlr

Please provide your files if still you have issue

coolinuxoid
  • 101
  • 1
0

The issue was solved by installing WeaveNet as the CNI. I could not further analyse and find what was the issue when using Flannel.