Open Sanjay-George opened 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
For local : helm install -f local-values.yaml --dry-run --debug animal-service .
For prod : helm install --dry-run --debug animal-service .
how to organize the charts? Different charts per service?
https://devops.stackexchange.com/questions/13379/use-one-helm-chart-for-all-microservices
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
keep seaprate config for local and update ports for each service
Keep separate YAML files for local k8 cluster and make all services LoadBalancer (better solution) Use HELM Custom values for managing local vs prod.
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