From 0e3e953236b54c57fb364facda9d3353128a8b0a Mon Sep 17 00:00:00 2001 From: Tim Bannister Date: Thu, 9 Feb 2023 14:46:43 +0000 Subject: [PATCH] Add note about valid characters for kubectl create from directory --- .../configure-pod-configmap.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md b/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md index 223b86aa87..f07d2cde87 100644 --- a/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md +++ b/content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md @@ -62,10 +62,19 @@ about a ConfigMap. You can use `kubectl create configmap` to create a ConfigMap from multiple files in the same directory. When you are creating a ConfigMap based on a directory, kubectl identifies files -whose basename is a valid key in the directory and packages each of those files into the new +whose filename is a valid key in the directory and packages each of those files into the new ConfigMap. Any directory entries except regular files are ignored (for example: subdirectories, symlinks, devices, pipes, and more). + +{{< note >}} +Each filename being used for ConfigMap creation must consist of only acceptable characters, which are: letters (`A` to `Z` and `a` to z`), digits (`0` to `9`), '-', '_', or '.'. +If you use `kubectl create configmap` with a directory where any of the file names contains an unacceptable character, the `kubectl` command may fail. + +The `kubectl` command does not print an error when it encounters an invalid filename. +{{< /note >}} + + Create the local directory: ```shell