Search code examples
spring-bootdockerkubernetesweb-deploymentovh

Running multiple instances of same springboot application


I've a spring-boot application which i want to deploy on OVH public cloud.

I need t achieve the goal of deploying multiple instances of the same application, and each instance has to have its own resources (such as MySQL database).

Each instance has to be accessed with a special url. For example:

I'm really new to everything which concerns cloud computing and deployments.

From what i read on the internet, my doubt is to

  • Use Docker where each instance has to be running inside its own container (to have the resources separated for each instance)

  • Use Kubernetes to achieve the goal of having each instance accessable from a specific url.

Am i wrong ? any online courses / resources / videos which can help would be awsome.

Thanks in advance.


Solution

  • Basically, Docker is a platform to develop, deploy, and run applications inside containers, therefore containers represent run-time environment for images. Kubernetes plays the role as an orchestrator and provides sufficient way for building communication channels between containers in the cluster and uses Docker by default as a container runtime.

    There are some essential concepts in Kubernetes that describe a cluster core components and application workload, thus define a desired state of the cluster.

    Kubernetes objects represent abstraction level of cluster management operations and containerized applications run-time environment within associated resources in Kubernetes API.

    I would focus on the Kubernetes resources that are most crucial in application deployment lifecycle.

    Deployment is the main mechanism which defines how are Pods should to be implemented within a cluster and provides specific configuration for further application run-time workflow.

    Service describes a way how the particular Pod will communicate with other resources within a cluster, providing endpoint IP address and port where your application will respond.

    Ingress exposes Kubernetes service outside the cluster with some exclusive benefits like load balancing, SSL/TLS ceritficate termination, etc.

    You can get more relevant information about Kubernetes implementation in OVH within particular guide chapter.