Store configuration data in key-value pairs within a ConfigMap, including single attributes or entire configuration files. ConfigMaps can be referenced in workloads through environment variables, configuration references, and other means.
Note: A Pod can only use ConfigMaps within the same namespace.
Navigate to Container Platform.
In the left sidebar, click Configuration > ConfigMap.
Click Create ConfigMap.
Refer to the instructions below to configure the relevant parameters.
Parameter | Description |
---|---|
Entries | Refers to key:value pairs, supporting both Add and Import methods.
|
Binary Entries | Refers to binary files not larger than 1M. The file name will be used as the key, and the file content will be used as the value, filled into a configuration item. Note: After creating a ConfigMap, the imported files cannot be modified. |
Example of Bulk Add Format:
Click Create.
You can click the (⋮) on the right side of the list page or click Actions in the upper right corner of the detail page to update or delete the ConfigMap as needed.
Changes to the ConfigMap will affect the workloads that reference the configuration, so please read the operation instructions in advance.
Operations | Description |
---|---|
Update |
|
Delete | After deleting a ConfigMap, workloads that have referenced this ConfigMap (or its configuration items) through environment variables may be adversely affected during Pod creation if they are rebuilt and cannot find the reference source. |