Issue
I am having an application whose front-end is in angular, back-end is node-js and I am using apache httpd as web-server, I want to automate the application by creating pipeline, dockerize the application and deploy it on Kubernetes cluster. What would be the best approach, should I create a single pipeline, or create two different pipeline for front-end and back-end. Let’s say I have created two different pipeline with two different repos, how will the interact with each other?
Solution
it should be always better to separate out the thing and make distributed system.
Consider if you have two different repository
- Angular
- Node
now if you have are running the Kubernetes cluster when you change in Angular application only your front end application will deploy and when you update the Node JS only the application will get deployed into the cluster.
Regarding the interact you use the Kubernetes service name for internal communication
Flow will be something like for Kubernetes
User > Nginx ingress > Angular service > Angular Deployment > Sending request to Node application internally using Kubernetes service name as DNS. > Node JS deployment
at the place of apache, you can use the Nginx ingress for managing routing the traffic.