DMCA.com Protection Status Trending Topics About Devops: Configmap with env-file

Thursday, 3 June 2021

Configmap with env-file

 vi env.sh




variable1=value1

variable2=value2

variable3=value3

variable4=value4



kubectl create cm cm7 --from-env-file=env.sh




kubectl get cm


NAME   DATA   AGE

cm1    0      36m

cm2    0      36m

cm3    1      30m

cm4    2      23m

cm5    3      11m

cm6    1      2m4s

cm7    4      3s




kubectl create cm cm6 --from-file=env.sh


variables name cannot be started from numbers


e.g

355 variables=value1   >> wrong method

No comments: