Home > Blockchain >  How to share a software product having multiple microservices and with specific Kubernetes configura
How to share a software product having multiple microservices and with specific Kubernetes configura

Time:05-04

I am new to Kubernetes. I have a doubt.

Say I have a software product which has 5 Microservices. It is deployed on my Kubernetes cluster (OCP Cluster) and it is working fine. Each microservice has Kubernetes configuration files on cluster - deployment, service, configmap yaml files etc.

Suppose I want to sell the product to customers and they will setup in their own prod Kubernetes cluster (May be in OCP or Amazon EKS etc)

Which is the appropriate way to give the product to the customers?

Way1 - Sending all the yaml files (deployment.yaml, service.yaml, configmap.yaml) for each microservice. As total 5 Microservices so 5 deployment.yaml, 5 service.yaml, configMap.yaml files etc. Upon receiving those files they will manually setup the files in their Kubernetes cluster and then all the pods will come up.

Way2 - For each microservice we will give the Kubernetes Helm chart. So total 5 Helm Charts for 5 Microservices. Upon receiving the charts they will install all the yaml files with helm install.

Way3 - Or any other better way?

Note- Private Docker Image Repository access will be given to the customers for pulling the microservice images.

CodePudding user response:

Way 1: No. There is tooling to do this. You shouldn't need to send yaml files around.

Way 2: This is the best way but with some edits. Create 5 helm charts that manage the separate components of your product. Then create a 6th chart that depends on the other 5. This way you only have to give 1 "product" chart to the consumer and that chart then pulls everything it needs to run. This is usually how its done. See projects like loki-stack from grafana. They have a helm chart called 'loki-stack' and that chart has dependencies on grafana, loki, Prometheus, promtail etc. Your consumers will then just helm install my-product and helm will take care of getting the 5 service charts.

Way 3: There are many ways to do this but they are all kind of specific to implementations. For example you can use OAM KubeVela. However if a consumer doesn't use OAM KubeVela its a problem. IMO Helm is the standard approach fow now until more people start using stuff like KubeVela

  • Related