You can create a ConfigMap on the ConfigMaps page or by using a template. You can use ConfigMaps to store non-sensitive, unencrypted configuration information. This topic describes how to create a ConfigMap.

Create a ConfigMap on the ConfigMaps page

  1. Log on to the Container Service console.
  2. In the left-side navigation pane, choose Configuration > ConfigMaps.
  3. On the ConfigMaps page, select the target Cluster and Namespace, and then click Create.
  4. Enter a name for the ConfigMap object, click the plus sign to enter the key and value, and then click OK.
    Set the ConfigMap
    • ConfigMap Name: Required. The name of the ConfigMap object. The name can contain lowercase letters, digits, hyphens (-), and periods (.). Other resource objects need to reference ConfigMap names to obtain configuration information.
    • ConfigMap: Enter configuration information in key-value pairs. You can also click Browse to create the ConfigMap from a file.
  5. Click OK.

    You can find the test-config ConfigMap on the ConfigMaps page.

    Configuration file

Create a ConfigMap from a template

  1. On the page that appears, set the parameters and click Create.
    • Cluster: The cluster where the ConfigMap is created.
    • Namespace: The namespace where the ConfigMap belongs. A ConfigMap is a kind of Kubernetes resource object and must be scoped into a namespace.
    • Sample Template: You can choose Custom and enter your own ConfigMap based on YAML syntax, or select the Resource-ConfigMap template. In the sample template, the ConfigMap is named aliyun-config and contains two variable files and You can modify the ConfigMap based on your needs.
    Create from a template
  2. Click Create.


You can find the aliyun-config ConfigMap on the ConfigMaps page.
Configuration file