hardkubectl

Create a ConfigMap by importing all key-value pairs from a .env file

command

kubectl create configmap CONFIG_NAME --from-env-file ENV_FILE

also accepted

kubectl create configmapkubectl create configmap CONFIG_NAME --from-env-file

Command breakdown

Part of the Kubernetes CLI (kubectl) — ConfigMaps & Secrets category.

kubectlcreateconfigmapCONFIG_NAME--from-env-fileENV_FILE
FlagPurpose
--from-env-fileBoolean flag

Test your recall — not just your reading.

Practice with interactive quiz →