kubernetes architecture for microservices application - suggestions

7/4/2018

I have been asked to create a system which has different functionalities. Assume service 1, service 2 and service 3. I need to run these services per hour to do something. To make the system of those services I need: database, web interface for seeing the result of the process, caching and etc. This is what I have thought about so far:

  • I need kubernetes to orchestrate my services which are packaged as docker containers. I will deploy mySql to save my data and I can use Redis cache for caching.

  • My service are written by python scripts and Java and need to interact with each other through APIs.

  • I think I can use AWS EKS for my kubernetes cluster


this is what I need to know:

  • how to deploy python or Java applications and connect them to each other and also connect them to a database service
  • I also need to know how to schedule the application to run per hour so I can see the results in the web interface.

Please shoot any ideas or questions you have.

Any help would be appreciated.

-- Milix
docker
java
kubernetes
python

1 Answer

7/4/2018

For python/java applications, create docker images for both applications. If these application run forever to serve traffic then deploy them as deployments.If you need to have only cron like functionality, deploy as Job in kubernetes.

To make services accessible, create services as selector for applications, so these services can route traffic to specific applications.

Database or cache should be exposed as service endpoints so your applications are environment independent.

-- Akash Sharma
Source: StackOverflow