You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "caibirdme (via GitHub)" <gi...@apache.org> on 2023/04/21 05:19:49 UTC

[GitHub] [apisix-helm-chart] caibirdme opened a new issue, #539: k8s discovery doesn't work

caibirdme opened a new issue, #539:
URL: https://github.com/apache/apisix-helm-chart/issues/539

   I setup a apisix cluster in my k8s cluster, configured the k8s discovery, but it doesn't work. When I curl the api, it returns 503.
   
   here's my values.yaml file
   ```yaml
   discovery:
     enabled: true
     registry:
       kubernetes: {}
   serviceAccount:
     create: true
   rbac:
     create: true
   nginx:
     envs:
       - KUBERNETES_SERVICE_HOST
       - KUBERNETES_SERVICE_PORT
   ```
   
   and here's my route:
   ```json
   {
     "uri": "/echo/*",
     "name": "echo",
     "methods": [
       "GET"
     ],
     "upstream": {
       "type": "roundrobin",
       "scheme": "http",
       "discovery_type": "kubernetes",
       "pass_host": "pass",
       "service_name": "echo-server.default.svc.cluster.local:80"
     }
   }
   ```
   
   the error message shows:
   ```
   11.176.16.149 - - [21/Apr/2023:13:11:17 +0800] 11.149.240.37 "GET /echo/foo HTTP/1.1" 503 269 0.000 "-" "curl/7.87.0" - - - "http://11.149.240.37"
   2023/04/21 13:11:20 [error] 55#55: *19514 [lua] init.lua:486: handle_upstream(): failed to set upstream: no valid upstream node: nil, client: 11.176.16.149, server: _, request: "GET /echo/foo
   HTTP/1.1", host: "11.149.240.37"
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-helm-chart] caibirdme commented on issue #539: k8s discovery doesn't work

Posted by "caibirdme (via GitHub)" <gi...@apache.org>.
caibirdme commented on issue #539:
URL: https://github.com/apache/apisix-helm-chart/issues/539#issuecomment-1517484003

   After reading the source code, I find out the answer
   
   namespace/endpoint_name:port_name
   
   the last one is port_name rather than port_number
   
   example: default/echo-server:http


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-helm-chart] caibirdme commented on issue #539: k8s discovery doesn't work

Posted by "caibirdme (via GitHub)" <gi...@apache.org>.
caibirdme commented on issue #539:
URL: https://github.com/apache/apisix-helm-chart/issues/539#issuecomment-1517444088

   Didn't find many obvious examples in test cases...
   Is ${namespace}/${svc-name}:${port} a valid service_name?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-helm-chart] caibirdme closed issue #539: k8s discovery doesn't work

Posted by "caibirdme (via GitHub)" <gi...@apache.org>.
caibirdme closed issue #539: k8s discovery doesn't work
URL: https://github.com/apache/apisix-helm-chart/issues/539


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-helm-chart] tao12345666333 commented on issue #539: k8s discovery doesn't work

Posted by "tao12345666333 (via GitHub)" <gi...@apache.org>.
tao12345666333 commented on issue #539:
URL: https://github.com/apache/apisix-helm-chart/issues/539#issuecomment-1517336644

   You can refer to the test cases about this function in the APISIX project


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org