Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Enabling discovery kubernetes services configuration doesn't list cluster existing endpoints in Dashboard Service list #11057

Closed
singhajitk opened this issue Mar 19, 2024 · 10 comments · Fixed by #11111

Comments

@singhajitk
Copy link

singhajitk commented Mar 19, 2024

Current Behavior

The cluster existing endpoints in not getting listed in Dashboard Service list after providing the discovery kubenetes services configuration

Expected Behavior

My understanding is that existing cluster endpoints should get listed or available after search in Dashboard Service list

Error Logs

No response

Steps to Reproduce

  1. Install APISIX with the apache / apisix-helm-chart with discovery kubernetes services configuration
discovery:
  kubernetes:
    client:
      token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
    default_weight: 50
    service:
      host: ${KUBERNETES_SERVICE_HOST}
      port: ${KUBERNETES_SERVICE_PORT}
      schema: https

Environment

  • APISIX version (run apisix version): - 3.8.0

  • Operating system (run uname -a): Linux apisix-647b4867df-79542 5.4.0-136-generic test: only check part of schema. #153~18.04.1-Ubuntu SMP Wed Nov 30 15:47:57 UTC 2022 x86_64 GNU/Linux

  • OpenResty / Nginx version (run openresty -V or nginx -V):
    nginx version: openresty/1.21.4.2
    built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
    built with OpenSSL 3.2.0 23 Nov 2023
    TLS SNI support enabled

  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info): 404 Not Found

  • APISIX Dashboard version, if relevant: 3.0.0

  • Plugin runner version, for issues related to plugin runners:

  • LuaRocks version, for installation issues (run luarocks --version): luarocks: command not found

@singhajitk singhajitk changed the title bug: Enabling discovery kubenetes services configuration doesn't list cluster existing endpoints in Dashboard Service list bug: Enabling discovery kubernetes services configuration doesn't list cluster existing endpoints in Dashboard Service list Mar 19, 2024
@shreemaan-abhishek
Copy link
Contributor

Dashboard Service list

What is Dashboard Service list? Please elaborate your problem and provide more details on reproduction steps. A set of steps containing self contained minimal configurations would be appreciated.

@singhajitk
Copy link
Author

Dashboard Service list

What is Dashboard Service list? Please elaborate your problem and provide more details on reproduction steps. A set of steps containing self contained minimal configurations would be appreciated.

Hi @shreemaan-abhishek, Thanks for looking into this issue.

From the Dashboard Service list, I mean, in APISIX Dashboard UI, service page is not listing any of existing Kubernetes endpoints after enabling "discovery kubernetes service" configuration. I have attached screenshot below.

Screenshot 2024-03-20 150708

@shreemaan-abhishek
Copy link
Contributor

can you confirm if the admin api also returns an empty result? this information is key to identify if the issue is with APISIX or just the dashboard.

@singhajitk
Copy link
Author

singhajitk commented Mar 24, 2024

can you confirm if the admin api also returns an empty result? this information is key to identify if the issue is with APISIX or just the dashboard.

Hi @shreemaan-abhishek ,
I did curl call for the admin api and it also returns empty list. The screenshot is attached
Screenshot 2024-03-24 153016

The configurations used for apisix is as below:

apisix-config.txt

kubernetes service discovery configuration:

discovery:
  kubernetes:
    client:
      token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
    default_weight: 50
    service:
      host: xx.xx.xx.xx
      port: "443"
      schema: https

@hanqingwu
Copy link
Contributor

@singhajitk , I think you confuse about apisix service and Kubernetes service endpoints. The dashboard only show apisix service "A service consists of a combination of public plugin configuration and upstream target information in a route"
I think maybe there is no admin api to list Kubernetes service endpoints yet .

@singhajitk
Copy link
Author

@singhajitk , I think you confuse about apisix service and Kubernetes service endpoints. The dashboard only show apisix service "A service consists of a combination of public plugin configuration and upstream target information in a route" I think maybe there is no admin api to list Kubernetes service endpoints yet .

Hi @hanqingwu, As per document apisix/discovery/kubernetes (https://apisix.apache.org/docs/apisix/discovery/kubernetes/)
documentation, It looks like kubernetes services should get listed. The apisix services are getting listed without providing the discovery->kubernetes configuration.

@shreemaan-abhishek, Please correct me if my understanding is wrong that "kubernetes services should get listed when discovery->kubernetes configuration" is enabled ?

@hanqingwu
Copy link
Contributor

@singhajitk , From view source code , I don not find dump_data interface in discovery kubernetes .

@singhajitk
Copy link
Author

@singhajitk , From view source code , I don not find dump_data interface in discovery kubernetes .

@hanqingwu, Thank you for looking into it.

@shreemaan-abhishek , will this feature get added ?

@hanqingwu
Copy link
Contributor

@singhajitk, I add a interface to dump k8s data , like this.

curl http://127.0.0.1:9092/v1/discovery/kubernetes/dump

@singhajitk
Copy link
Author

@singhajitk, I add a interface to dump k8s data , like this.

curl http://127.0.0.1:9092/v1/discovery/kubernetes/dump

@hanqingwu, Thank you for looking onto this. I will upgrade and try.

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Apache APISIX backlog Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants