1

I am using official helm chart to install the APISIX in my Kubernetes. I only override the following values from the official helm chart:

  1. useDaemonSet-> true
  2. serviceAccount -> set create to true and provide the sa name
  3. rbac.create -> true
  4. discovery -> set enable to true and uncomment kubernetes:{} under registry
  5. ssl -> set to true and provide the ca cert which is stored as tls secret in Kubernetes
  6. Dashboard -> set enable to true

Besides that, I am using all the default values in the official helm.

However, when I try to set a route, using Kubernetes as the discovery, and set my service (deployed in Kubernetes) as the upstream in the dashboard, I can't connect to it. The following error logs are shown:

2024/06/27 10:57:41 [error] 50#50: *8898 [lua] init.lua:548: handle_upstream(): failed to set upstream: no valid upstream node: nil, client: 10.0.2.15, server: _, request: "GET /alert/ HTTP/1.1", host: "10.152.183.66" 10.0.2.15 - - [27/Jun/2024:10:57:41 +0000] 10.152.183.66 "GET /alert/ HTTP/1.1" 503 269 0.000 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0" - - - "http://10.152.183.66 

I have a service created in Kubernetes default namespaces, and using the port 3000 I already set the upstream in the routes as default/my-service:3000

NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE my-service ClusterIP 10.152.183.23 <none> 3000/TCP 7d7h 

But, it seems like apisix still cannot find the upstream service via kubernetes discovery.

Any ways to fix it?

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.