Using consul helm as sub chart


I am trying to use the consul helm chart as a sub chart with all the services specified in my templates folder. The issue I am facing is that the sidecar proxies are not injected properly in that case while it works as expected if I first deploy the consul helm chart and then my stack as a separate chart.

I am pretty new to kubernetes/helm and I am not sure if this is the right approach to deploy consul with my services. My idea is that it should all be in one helm chart rather than multiple ones.

Are there any examples on how to use consul helm as sub chart or what are the best practices on how to use the chart?

Some advice would be appreciated

Hi @nflaig our general recommendation is to use Kubernetes manifests (i.e. Kube YAML) for defining and deploying your services. It may be possible to use Helm templates deploy your own services but we have not tested against them. Our direction is to leverage Kubernetes manifests as well for deploying CRDs which will in the future help you configure Consul for things like intentions and layer 7 routing in the service mesh.

We use Helm as a method of deploying Consul since it is a fairly nice way to package and distribute third party software for Kubernetes but we have not explored this as a way for users to define and deploy services.

Thanks @david-yu for the elaborate answer. The approach I am currently using is to deploy the consul helm chart and afterwards deploy the services helm chart. This seems to work well so far, I guess the problem is that it needs to be ensured that consul is running before any service is created else the sidecar/agent injection does not work.

Yes that should work just fine then. You should do a quick kubectl get pods to see if the client, and/or server pods, as well connect inject is healthy before deploying your services.