Deployment for more than one Kubernetes service inside Helm chart /templates folder

4/21/2019

I am using Kubernetes helm chart for my Kubernetes service deployment. I have different services now, called x1, x2 upto x10. So now I created x1.yaml inside my templates folder. And running the 'helm install ./mychart'. And now I am getting deployment inside my Kubernetes cluster.

Can I add .yaml files (x2.yaml to x10.yaml) for all my Kubernetes service inside templates folder, and can I deploy together all by using 1 chart ?

I did not properly understood the hierarchy of Helm chart for Kubernetes resource deployment.

-- Jacob
kubernetes
kubernetes-helm

1 Answer

4/21/2019

Anything that you put into templates/ folder will be rendered as Kube manifest. If you add 10 manifests there - 10 manifests will be applied on "helm install". It is up to you how you want this to work.

You can put all your apps into single Helm chart and create one values.yaml for all your applications. This is absolutely valid practice although not very popular. Whenever you change values.yaml and issue "helm upgrade" - changed manifests will be reapplied.

Or you can create separate chart per application, that's how most of charts look like. In that case you will upgrade applications separately from each other. I think this method is preferred.

-- Vasily Angapov
Source: StackOverflow