Deploying the application into the Kubernetes
Now that we have completed the steps to containerize the application using a Dockerfile and pushed its image to the container registry, Docker Hub, as well as created the required Kubernetes Deployment
, Service
, and Ingress
manifests, we are ready to proceed with the next phase.
In this phase, we will refactor the application, install minikube to create a local Kubernetes cluster, deploy the prepared manifests, and test the application to ensure it runs as expected. Let’s refactor our application and understand why this extra step is necessary.
Refactoring the application
For simplicity, we will focus on the authentication services API to illustrate the process of deploying an application in Kubernetes, removing Spring Cloud dependencies in favor of Kubernetes-native features such as service discovery and traffic routing.
Now let’s refactor the authentication services:
Spring Cloud Patterns and Kubernetes
...