2

since this morning i've a question in my mind. What is the best things to manage file configuration on kubernetes!

For the moment we use PVC & PV

But i would want to update automatically during the CI pipeline the config files . For one application we have almost 10 configs files

How can i update it automatically with kubernetes ? Or do you think i will have to change for configMap ?

I still reading the documentation on internet but i dont find an answear to my question :(

Thanks

Digil
  • 742
  • 4
  • 12
morla
  • 675
  • 4
  • 15
  • 32

1 Answers1

1

If it is configuration then a ConfigMap fits. You can update the ConfigMap resource descriptor file as part of your CI pipeline and then apply that change with 'kubectl apply' and you can do a rolling update on your app. This moves you in the direction of every config change being a tracked and versioned change.

You may also want to look at Secrets, depending on how sensitive your config is.

I guess you will have the same number of files whether in a PV or a ConfigMap - the choice only affects how they are made available to the app in Kubernetes. But if you find your CI pipelines are doing a lot of replacements then a templating system could help. I'd suggest looking at helm so that you can pass parameters into your deployments at the time of deploy.

Ryan Dawson
  • 11,832
  • 5
  • 38
  • 61
  • we use helm to deploy. So i going to continue to readsome documentation on configMap. – morla Nov 28 '18 at 09:15
  • Cool, might be worth you looking at https://stackoverflow.com/questions/47595295/how-do-i-load-multiple-templated-config-files-into-a-helm-chart as seems like your scenario is very similar – Ryan Dawson Nov 28 '18 at 10:11