Write helm chart from scratch

[Reposted from my article in Medium]

Given the application, how should you convert your application to helm chart, so it can be deployed anywhere, with ease of configuration?

You might think your application is so simple, and just need 1–2 yaml files. Using “kubectl apply” will do, why bother writing the helm chart as it’s complicated? Maintaining few yaml files is okay if your application is a pretty small module, and most of settings are static, not much changes. Otherwise, I would recommend you are converting your application into the helm chart. This will help you:

  • You only need to write the template one time, and all the changes in one values.yaml file should cover all the changes you need for your application.
  • You have to deploy your application in different environments, you only need to change the values.yaml file, that would tailor to your experiments.
  • Deploy and upgrade never been easier with just 2–3 commands. Or if you need to tear it down, helm uninstall will help you to clear all the resources for that release.
  • The sharing to community or other team is also flexible and convenient. You don’t need to share the actual values or secrets with them. All you share is the templates. You shouldn’t miss any secret you put somewhere in the yaml file because hard-coded somewhere in the long yaml file and you forgot to clean up before you press “Send” button!

The full article is here

Comment Disabled for this post!