Reusing the same image, config, secrets for several different kubernetes services

2/21/2019

We have a bunch of services that run off of the same Docker image: some long running services, some cron jobs, and a webservice.

I'm wondering what the current best practice here is? I essentially want some basic templating for reusing an image and its config, keeping all of them at the same revision (so sirensoftitan-image:{gitsha1hash} is used where gitsha1hash isn't repeated everywhere).

Should I be using a helm chart? Kustomize? Some other type of yaml templating? I want something light with as little added complexity as possible.

-- SirensOfTitan
kubernetes
kubernetes-helm

1 Answer

2/21/2019

I found helm chart heavy compared to kustomize. Give kustomize a try, very simple and easy to use. You can deploy the same template for different environments by adding new labels, updating the deployment objects name by prefixing with environment value. So you can have unique naming convention for different environments.

More over it uses YAML format which makes it easy to learn and adopt it. All custom configuration goes into one YAML file unlike helm in which you manage multiple files. I personally like kustomize as it is simple and flexible and not the least comes from Google community. Give it a try

-- P Ekambaram
Source: StackOverflow