We have our app specific properties specified in the below files
application.properties
application-dev.properties
application-qa.properties
While creating a configmap in kubernetes, I wanted to merge the contents into one single file. Is it possible to merge the contents?
I know we can achieve through kustomize. However we are using Helm Charts and we are not using kustomize.
https://github.com/kubernetes-sigs/kustomize/blob/master/examples/combineConfigs.md
try this simple trick
cat application*.properties > app.properties && kubectl create configmap myconfigmap --from-file=app.properties
you can use app.properties in helm chart
Place the ConfigMap files inside a folder, and then pass the folder path to the kubectl
command:
kubectl create configmap config-name --from-file=path_to_the_folder
Link to follow: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/