In this article, we will deploy a simple Spring Boot based application inside a K8S cluster.
To take the best of this article you should have a basic understanding of these subjects :
First things first let’s prepare the application. We will expose a greeting endpoint that we can later consume by calling the path /hello
To make it simple i implemented the endpoint directly in the entry point of the application which it’s not a good practice, you know SOC or SOR ( yes you’re right, one of the SOLID principales). …
In the previous article, we discussed how to deploy our simple application into a K8S cluster. Feel free to have a quick look at it, because it would help in this article in which we will explain how to consume the deployed application from the previous article.
We left the last article with this challenge in mind:
How we can consume our hello endpoint from two running instances of the same application with different IP addresses ?
Obviously, the automatic answer was to place a load balancer and it’s the right answer. but it’s not the only way to access a deployed application in K8S. In fact, a Load balancer is just one of the four types of services that are available for use in K8S, these four types are…