Creating config map using ENV file

vi env.sh
variable1=value1
variable2=value2
variable3=value3
variable4=value4
kubectl create cm cm6 --from-env-file=env.sh

if we describe the above-created config map, then we can observe that content in the env file will be created as the individual key-value pair, so every variable has its own value pair. On the other hand if we create a config map using --from-file then it will create single key-value pair where the key will be file name and value will be the content of the file

note: make sure in env file proper variable name. The invalid variable will be ignored while creating config map