Search Docs...
⌘ K
OverviewDeploymentManagementOperationReferenceGlossary

Managing ConfigMaps

A ConfigMap is used to store non-confidential data in key-value pairs. It is commonly used to store configuration information required by workloads. Applications read corresponding configurations from configuration files, command-line arguments, or environment variables.

Creating a ConfigMap

  1. Click the display name of the target workload cluster in the workload cluster list to enter the Overview page of the workload cluster.

  2. In the sidebar, click Configuration > ConfigMap.

  3. Click + Create ConfigMap.

  4. Configuration provides the following default YAML template, where you can configure relevant parameters as needed.

    apiVersion: v1
    kind: ConfigMap    # The type of resource. This YAML configuration defines a ConfigMap.
    metadata:
      name: example    # The name of the ConfigMap.
      namespace: default    # The namespace to which the ConfigMap belongs.
    data:
      key: value    # The configuration information of the storage, expressed in the form of key-value pairs.
    immutable: false    # Whether to set ConfigMap to be immutable, false means mutable.
    

    In the upper right corner of the configuration, you can copy YAML, reset YAML, or view YAML changes.

  5. Click Create.

Viewing ConfigMaps

  1. In the workload cluster list, click the display name of the target workload cluster to enter the Overview page of the workload cluster.

  2. In the sidebar, click Configuration > ConfigMap to view all ConfigMap Info of the workload cluster in the list. You can quickly filter based on one or more namespaces.

    Parameter Description
    Name The name of the ConfigMap.
    Namespace The namespace to which the ConfigMap belongs.
    Data The configuration information of the ConfigMap, displaying the key value in the key-value pair.
    Creation time The creation time of the ConfigMap.
  3. Click the name link of the ConfigMap to view its detailed information.

    • Basic information: In addition to the parameters included in the ConfigMap list, it also displays the label and annotation information of the ConfigMap.

    • Data: Displays the values of key and value in the key-value pair.

On the ConfigMap list page, select ... to perform the following operations; you can also enter the ConfigMap details page to perform corresponding operations.

  • Edit YAML: Edit the YAML configuration of the ConfigMap. For specific parameter descriptions, refer to Creating a ConfigMap.

  • Download YAML: Download the YAML file of the ConfigMap.

  • Delete: For ConfigMaps that are no longer needed, you can perform the delete operation.