hardkubectl

Create a ConfigMap populated with the contents of a file on disk

command

kubectl create configmap CONFIGMAP_NAME --from-file=FILEPATH

also accepted

kubectl create configmap CONFIGMAP_NAME --from-filekubectl create cm CONFIGMAP_NAME --from-filekubectl create cm CONFIGMAP_NAME --from-file=FILEPATH

Command breakdown

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

kubectlcreateconfigmapCONFIGMAP_NAME--from-file=FILEPATH
FlagPurpose
--from-fileSet to: FILEPATH

Test your recall — not just your reading.

Practice with interactive quiz →