Matthias M
Matthias M

Reputation: 14800

Best practises for helm kubernetes deployment pipeline in a development environment?

These are the best practises for a helm deployment which I figured out so far:

  1. Use versioned images, because deploying via latest tag is not sufficient, as this may not trigger a pod recreate (see When does kubernetes helm trigger a pod recreate?).
  2. Use hashed configmap metadata to restart pods on configmap changes (see https://helm.sh/docs/howto/charts_tips_and_tricks/)

In a development environment new images are created often. Because I don't want to trash my container registry, I'd prefer using latest tags.

The only solution - I can think of - is to use versioned imaged and a cleanup job to remove old image from the registry. But this is quite complicated.

So what are your best practises for helm deployments in a development environment?

Upvotes: 0

Views: 76

Answers (1)

Ilia Kondrashov
Ilia Kondrashov

Reputation: 746

Indeed, using :latest will mean that your deployments will be mutable.

AWS ECR allows you to keep limited number of latest images according to certain regex. So you can use dev- prefix for your non-production deployments (for example triggered outside of master branch) and keep only 10 latest of them.

Upvotes: 2

Related Questions