You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/11/01 00:55:30 UTC

[GitHub] [apisix] sheng-jie opened a new issue, #8220: docs: What does it mean If the kubernetes service discovery runs inside a pod?

sheng-jie opened a new issue, #8220:
URL: https://github.com/apache/apisix/issues/8220

   ### Current State
   
   In this article:[Discovery-Kubernetes](https://apisix.apache.org/docs/apisix/2.15/discovery/kubernetes/)
   
   The description in italics below is a bit confusing. What does it mean If the kubernetes service discovery runs inside/outside a pod? 
   
   _If the kubernetes service discovery runs inside a pod_, you can use minimal configuration:
   
   ```
   discovery:
     kubernetes: { }
   ```
   _If the kubernetes service discovery runs outside a pod_, you need to create or select a specified [ServiceAccount](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/), then get its token value, and use following configuration:
   
   ```
   discovery:
     kubernetes:
       service:
         schema: https
         host: # enter apiserver host value here
         port: # enter apiserver port value here
       client:
         token: # enter serviceaccount token value here
         #token_file: # enter file path here
   ```
   
   ### Desired State
   
   Need to clarify.


-- 
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] sheng-jie closed issue #8220: docs: What does it mean If the kubernetes service discovery runs inside a pod?

Posted by GitBox <gi...@apache.org>.
sheng-jie closed issue #8220: docs: What does it mean If the kubernetes service discovery runs inside a pod? 
URL: https://github.com/apache/apisix/issues/8220


-- 
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] sheng-jie commented on issue #8220: docs: What does it mean If the kubernetes service discovery runs inside a pod?

Posted by GitBox <gi...@apache.org>.
sheng-jie commented on issue #8220:
URL: https://github.com/apache/apisix/issues/8220#issuecomment-1297899229

   ![upstream](https://user-images.githubusercontent.com/12607748/199139700-f7475472-2f7d-4d44-b92f-eaf4ac8ee28b.jpg)
   
   ![route](https://user-images.githubusercontent.com/12607748/199139839-54b673b7-1126-41be-9775-901976d34eb1.jpg)
   
   
   I want use Kubernetes service discovery but not work. I got error wiht '2022/11/01 09:35:23 [error] 44#44: *3639390 [lua] init.lua:540: http_access_phase(): failed to set upstream: no valid upstream node: nil, client: 10.111.0.24, server: _, request: "GET /swagger/index.html HTTP/1.1", host: "pre-svc1-api.octoparse.com"'
   


-- 
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] tokers commented on issue #8220: docs: What does it mean If the kubernetes service discovery runs inside a pod?

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #8220:
URL: https://github.com/apache/apisix/issues/8220#issuecomment-1297902434

   See https://apisix.apache.org/docs/apisix/discovery/kubernetes/#single-cluster-mode-query-interface to learn the service name format.


-- 
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] tokers commented on issue #8220: docs: What does it mean If the kubernetes service discovery runs inside a pod?

Posted by GitBox <gi...@apache.org>.
tokers commented on issue #8220:
URL: https://github.com/apache/apisix/issues/8220#issuecomment-1297875543

   Configurations can be fetched from container env. So you don't have to configure the service discovery settings explicitly.


-- 
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] sheng-jie closed issue #8220: docs: What does it mean If the kubernetes service discovery runs inside a pod?

Posted by GitBox <gi...@apache.org>.
sheng-jie closed issue #8220: docs: What does it mean If the kubernetes service discovery runs inside a pod? 
URL: https://github.com/apache/apisix/issues/8220


-- 
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] sheng-jie commented on issue #8220: docs: What does it mean If the kubernetes service discovery runs inside a pod?

Posted by GitBox <gi...@apache.org>.
sheng-jie commented on issue #8220:
URL: https://github.com/apache/apisix/issues/8220#issuecomment-1297944363

   But I got error when I use minimal configuration. The error is `2022/11/01 10:38:57 [error] 49#49: *6029 [lua] informer_factory.lua:295: list failed, kind: Endpoints, reason: Forbidden, message : {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"endpoints is forbidden: User \"system:serviceaccount:ingress-apisix:default\" cannot list resource \"endpoints\" in API group \"\" at the cluster scope","reason":"Forbidden","details":{"kind":"endpoints"},"code":403}
   , context: ngx.timer`
   
   ```
   discovery:
     kubernetes: { }
   ```
   


-- 
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] sheng-jie commented on issue #8220: docs: What does it mean If the kubernetes service discovery runs inside a pod?

Posted by GitBox <gi...@apache.org>.
sheng-jie commented on issue #8220:
URL: https://github.com/apache/apisix/issues/8220#issuecomment-1297922869

   > See https://apisix.apache.org/docs/apisix/discovery/kubernetes/#single-cluster-mode-query-interface to learn the service name format.
   
   Ok, I got it, thanks a lot. The service name should be `kube-pre-release/account-svc: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