Welcome to the Linux Foundation Forum!

Create configmap from file or env-file

The create configmap command as 2 possibilities to create it from a file:
--from-file : the key is the filename, the content of the file is the value
--from-env-file: the file contains key,value pairs (key=value)

The example on page "Create a ConfigMap from a File" (create from file permission-reset.properties) is wrong, in my opinion. It should be :

kubectl create configmap permission-config \
--from-env-file=<path/to/>permission-reset.properties

and not

kubectl create configmap permission-config \
--from-file=<path/to/>permission-reset.properties

The video later has an example with from-file with an index.html file

Comments

  • chrispokorni
    chrispokorni Posts: 2,434

    Hi @albertwaelti,

    You are correct, the suggested syntax is the appropriate one for the referenced example.
    Thank you for flagging this typo, it shall be corrected for this context.

    Regards,
    -Chris

Categories

Upcoming Training