Skip to content

Commit 748d4a9

Browse files
Update content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md
Co-authored-by: Shannon Kularathna <[email protected]>
1 parent c3f86b7 commit 748d4a9

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

content/en/docs/tasks/configure-pod-container/configure-pod-configmap.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -712,11 +712,8 @@ If you run this pod, and there is a ConfigMap named `a-config` but that ConfigMa
712712
a key named `akey`, the output is also empty. If you do set a value for `akey` in the `a-config`
713713
ConfigMap, this pod prints that value and then terminates.
714714

715-
#### Optional ConfigMap via volume plugin
716-
717-
Volumes and files provided by a ConfigMap can be also be marked as optional.
718-
The ConfigMap or the key specified does not have to exist.
719-
The mount path for such items will always be created.
715+
You can also mark the volumes and files provided by a ConfigMap as optional. Kubernetes always creates the mount paths for the volume, even if the referenced ConfigMap or key doesn't exist. For example, the following
716+
Pod specification marks a volume that references a ConfigMap as optional:
720717

721718
```yaml
722719
apiVersion: v1
@@ -737,9 +734,6 @@ spec:
737734
name: no-config
738735
optional: true # mark the source ConfigMap as optional
739736
restartPolicy: Never
740-
```
741-
742-
If you run this pod, and there is no ConfigMap named `no-config`, the mounted volume will be empty.
743737
744738
### Mounted ConfigMaps are updated automatically
745739

0 commit comments

Comments
 (0)