apiscout
apiscout copied to clipboard
Swagger Endpoint in discovered services
Hi,
- API Scout 0.2.0
Swagger presented by APIScout has the private K8S svc IP. Accordingly, Swagger is not usable.
Thanks,
I believe you followed below like steps:
- Get the latest API-Scout app and build docker image.
- Update image name & EXTERNAL-IP(minikube or cluster ip) values in apiscout.yml file.
- Build your microservice along with /swaggerspec handler.
- Update the annotations in your microservice yml file.
- Deploy the application & check the status once it is deployed open
minikube service apiscout-svc --url
in browser. - Use 'try it out' under API paths to verify the swagger.
Let me know if you tried something else along with exact configuration to re produce the issue.
Thanks, @nareshkumarthota this is running in a production like up, with a full functioning Kubernetes cluster, not minikube. In production like environments, we're not using EXTERNAL IPs but Ingress routes. in our case we're using nginx ingress routes on kubernetes.
please let me know if you need more understanding to the issue.
Thanks,
I need some details like:
- YML file of deployed API-Scout application.
- API-Scout api accessing url to check generated swaggers.
- URL of any one of your microservices.
@mshahat can you please provide more details?
- Is this a BWCE app deployed on K8s?
- "APIScout has the private K8s IP" - Can you please elaborate? I've set up a sample BWCE app on K8s along with APIScout. In my case, when I hit 'Try it out' on Swagger UI generated by APIScout, the request goes to ClusterIP of apiscout service instead of BWCE service ClusterIP. Are you facing the same issue?
- What's the expected behavior?
Hi,
- Yes, the BWCE app is deployed to K8S.
- We're not using EXTERNAL K8S Services, we're using INTERNAL ones. Access to endpoints is achieved using Ingress routes. APIScout discovers the Service, as the service doesn't have an external IP and only has an internal one ( within the cluster ), that's what is presented through API Scout.
The expected behaviour is may be
-
ability to annotate ingresses as well, and via both the Service and the Ingress, the right endpoints could be served
-
a tactical solution could be, annotating the service with another attribute e.g. apiscout/swaggerPublicEndpoint where we could capture the ingress endpoint url, or may be Mashery public endpoint
HTH,

@mshahat
Annotation support for ingress end url is added. Code changes pushed to branch 'feature-issue-15', give a try now.
check annotation name in readme page under #requirements-for-kubernetes
Thanks, @nareshkumarthota, will test ...
@mshahat Any update with the testing on your end?
Hi Jon, apologies, will test in a week time and let you know.
Cheers,