Sanjay-George / nick-name-generator

(Cloud App demo, not a toy!) A simple nickname generator built with microservice architecture. Docker and K8s deployment.
0 stars 0 forks source link

Simplify running and testing services on local #21

Open Sanjay-George opened 1 year ago

Sanjay-George commented 1 year ago

Since etcd works inside K8 cluster to discover services and most of the services are not exposed externally, there should be a better way to run and test the application on local.

Check image in comments describing the issue with current architecture.

Possible solutions

HELM

Subcharts and globals

Values

Use custom value files to separate out local and prod config On local : helm install -f values.yaml -f local-values.yaml bitnami/wordpress --generate-name On prod: helm install -f values.yaml bitnami/wordpress --generate-name

YouTube - intro to helm

Blogs

https://medium.com/@prbldeb/dealing-with-helm-charts-of-micro-services-with-interdependent-api-end-points-2fe9b508e484

https://dev.to/pavanbelagatti/how-to-create-a-simple-helm-chart-12fe

Sanjay-George commented 1 year ago

Image

Sanjay-George commented 1 year ago

2b is not an elegant solution since more and more services need to be run on local machines. Port needs to be maintained as well. Hence, using HELM charts to make services of type Loadbalancer on local and ClusterIP on prod. Also, can set the port appropriately for local environment

Sanjay-George commented 1 year ago

For local : helm install -f local-values.yaml --dry-run --debug animal-service . For prod : helm install --dry-run --debug animal-service .

Sanjay-George commented 1 year ago

how to organize the charts? Different charts per service?

https://devops.stackexchange.com/questions/13379/use-one-helm-chart-for-all-microservices