Now Where Did I Deploy That Microservice?"
Tracking microservices on Kubernetes can be a challenge. Explore how API Scout simplifies the process with annotations. Never ask 'Where did I deploy that microservice?' again!
As a developer advocate, I’m in the amazing position to talk to lots and lots of developers. Throughout those conversations I hear a lot of the same concerns popping up. Two of those being, “where did I deploy that microservice?” ๐ฉ and “what is the API definition of that microservice again?"๐
When your deployment footprint grows, keeping track of all those deployed microservices on Kubernetes can become quite a challenge. Keeping the API documentation updated for developers, could become even more challenging. To make an attempt to solve that challenge, we’ve released API Scout. API Scout helps you get up-to-date API docs to your developers by simply annotating your services in Kubernetes. The tool looks for two simple annotations in your service to be able to index a service:
apiscout/index: 'true'
: This annotation ensures that apiscout indexes the serviceapiscout/swaggerUrl: '/swaggerspec'
: This is the URL from where apiscout will read the OpenAPI document
So rather than making big changes to your app, you can add those two annotations to your service deployment file and just update that. For one of the sample apps I added, the updated yaml file looks like:
Just a part of the yaml file. The full file can be found here
To build your own instance, clone the repo and run make build-all
. To deploy, after updating the yaml file in the Kubernetes directory to match your desired settings, run make run-kube
.
So instead of “Where is that thing again?” ๐ you can now be, “I know what I deployed last summer!” ๐ While I think this is a very useful tool, and yes I have it running on my own local deployment of Kubernetes, I’d love to know your thoughts on it! Let me know by clapping ๐, dropping me a note here or by dropping me a note on Twitter. If you have any thoughts on how to make this better, just create a GitHub issue.
Cover image by Phad Pichebtovornkul on Unsplash