I am looking for a way to automate deployment of configmaps to our dev/qa/prod environments. Right now our applications rely on kubernetes configmap/secrets that we manually apply in the cluster using

kubectl apply -f {name-of-configmap}.yaml

This is fine and all but before I send my code to our dev environment for integration testing/load testing I have to go and apply the new configmap if I've made changes. Our configmaps aren't kept in the same repository as our code because we don't want the values leaking into git. It would be ideal if we had to use git or some version control that if I work on feature/A and I make a change to the configmap for the application it will be automatically applied as long as I set the values in some more abstract layer. Is there any pattern/tool I can use to do this? Currently for deployment we create a Helm chart for our application and it goes through CircleCI for CICD testing/deployment. But the configmap needs to be already applied before we can deploy.


2 Answers 2


The config maps can be stored on the version control system and can be defined on a per environment basis to simplify the setup and deployment.


I use Kustomize with Repository Variable (I use Bitbucket). There is a template for configmap and during pipeline runtime the secrets is injected and build the real configmap.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.