At present I am creating a configmap from the file config.json by executing:
kubectl create configmap jksconfig --from-file=config.json
I w
Soln 01:
config.json
file content into a templatedata
against config.json
$ helm install
commandfinally,
{{define "config"}}
{
"a": "A",
"b": {
"b1": 1
}
}
{{end}}
apiVersion: v1
kind: ConfigMap
metadata:
name: jksconfig
labels:
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
app: "my-app"
heritage: "{{ .Release.Service }}"
release: "{{ .Release.Name }}"
data:
config.json: {{ (include "config" .) | trim | quote }}