Skip to content

Create a ConfigMap ​

Create a ConfigMap to store application configuration values as key-value pairs or file content.

Prerequisites

  • The namespace where the ConfigMap will be used must exist.

Step 1. Open the Create ConfigMap form ​

Select Storage → ConfigMaps from the left sidebar. Click the Create config map button in the top right.


Step 2. Enter basic information ​

FieldDescriptionExample
NameConfigMap nameapp-config
NamespaceTarget namespacedefault

Step 3. Add data entries ​

Click Add Data Entry to add items.

Key-Value format (single values) ​

KeyValue
LOG_LEVELinfo
DB_HOSTdb.example.com
MAX_CONNECTIONS100

File format (multi-line values) ​

Enter the filename as the Key and the file content as the Value.

KeyValue
app.propertiesserver.port=8080\nlog.level=info
nginx.conf# nginx configuration...

TIP

When using volume mounts, each Key stored as a file will be created as a file named after that Key inside the Pod.


Step 4. Confirm creation ​

Click Create. Verify the created entry in the ConfigMaps list.


Using the ConfigMap in a Pod ​

The ConfigMap can be injected into Pods in two ways:

  • Environment variable: Deployment Edit Config → Environment Variables → From ConfigMap
  • File mount: See Mount Volume →

Next Steps ​

The New Standard for AI Infrastructure