Creating config map using ENV file



kubectl create cm cm6

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