Hi,
I am new to Kong, and am trying to get Kong (version 1.3.0rc2) working with a yaml configuration to set it up as a load-balancer. From my understanding I need to use upstream objects for this and then set multiple targets.
From the documentation I understand that the host
field in the service should be the same as that of the upstream name. Though this does not seem to work as it fails to resolve:
2019/08/26 14:26:34 [error] 36124#0: *2853 [lua] balancer.lua:848: execute(): DNS resolution failed: dns server error: 2 server failure. Tried: ["(short)a-upstream:(na) - cache-miss","a-upstream:33 - cache-miss/scheduled/querying/dns server error: 2 server failure","a-upstream:1 - cache-miss/scheduled/querying/dns server error: 2 server failure","a-upstream:5 - cache-miss/scheduled/querying/dns server error: 2 server failure"], client: 192.168.184.129, server: kong, request: "GET /a HTTP/1.1", host: "ubuntu.local"
kong.conf
proxy_listen = 0.0.0.0:80, 0.0.0.0:443 ssl
admin_listen = 127.0.0.1:8001, 127.0.0.1:8444 ssl
database = off
declarative_config = /etc/kong/kong.yml
kong.yml file:
_format_version: "1.1"
services:
- name: a-service
host: a-upstream
routes:
- paths:
- /a
upstreams:
- name: a-upstream
targets:
- target: httpbin.org
Anyone got a clue how to fix this?