Hi, I am new to Kong. And I had set up Kong for Kubernetes following the steps from Install Kong for Kubernetes - v2.0.x.
I think everything is fine, I use
curl -i $PROXY_IP
It prints:
HTTP/1.1 404 Not Found
Date: Tue, 02 Jun 2020 13:43:29 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Content-Length: 48
X-Kong-Response-Latency: 0
Server: kong/2.0.4
{"message":"no Route matched with those values"}
I create a pod in namespace kong
and execute curl -i 172.18.118.111:8100
, it prints:
HTTP/1.1 404 Not Found
Date: Tue, 02 Jun 2020 13:57:06 GMT
Content-Type: application/json; charset=utf-8
Connection: keep-alive
Access-Control-Allow-Origin: *
Server: kong/2.0.4
Content-Length: 23
X-Kong-Admin-Latency: 0
{"message":"Not found"}
curl -i 172.18.118.111:8100/status will return status data successfully as well.
172.18.118.111
is the IP of the pod where Kong running.
So I expect I can use curl to configure Kong, I use curl -i -X GET http://172.18.118.111:8444
:
But it prints:
curl: (7) Failed to connect to 172.18.118.111 port 8444: Connection refused
Here is the fractions of the yaml I use:
apiVersion: v1
kind: Service
metadata:
annotations:
# I add annotations here to use the alicloud loadbalancer
service.beta.kubernetes.io/alicloud-loadbalancer-id: **********
service.beta.kubernetes.io/alicloud-loadbalancer-force-override-listeners: "true"
name: kong-proxy
namespace: kong
....
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: ingress-kong
name: ingress-kong
namespace: kong
........
spec:
containers:
- env:
- name: KONG_PROXY_LISTEN
value: 0.0.0.0:8000, 0.0.0.0:8443 ssl http2
- name: KONG_ADMIN_LISTEN # Turn off ssl here
value: 127.0.0.1:8444
........
- env:
- name: CONTROLLER_KONG_ADMIN_URL
# value: https://127.0.0.1:8444
value: http://127.0.0.1:8444 # use http instead of https
- name: CONTROLLER_KONG_ADMIN_TLS_SKIP_VERIFY
value: "true"
- name: CONTROLLER_PUBLISH_SERVICE
value: kong/kong-proxy
How can I access to Kong? I am frustrated, have no idea what should I do now. I want to access to Kong and go with the Getting Stated Guide
to learn Kong. Any help would be appreciated, Thinks.