Create ConfigMaps

This section explains how to create ConfigMaps.

Prerequisites

You should join a cluster and have the Project Resource Management permission within the cluster. For more information, refer to “Cluster Members” and “Cluster Roles”.

Steps

  1. Log in to the KubeSphere web console with a user who has the Project Resource Management permission, and access your cluster.

  2. Click Configuration > ConfigMaps in the left navigation pane.

  3. Click Create on the page.

  4. On the Basic Information tab, set the basic information for the ConfigMap, and then click Next.

    ParameterDescription

    Name

    The name of the ConfigMap. The name can only contain lowercase letters, numbers, and hyphens (-), must start and end with a lowercase letter or number, and can be up to 63 characters long.

    Alias

    The alias of the ConfigMap. Aliases can be the same for different ConfigMaps. The alias can only contain Chinese characters, letters, numbers, and hyphens (-), cannot start or end with a hyphen (-), and can be up to 63 characters long.

    Project

    The project to which the ConfigMap belongs.

    Description

    The description of the ConfigMap. The description can contain any characters and can be up to 256 characters long.

  5. On the Data Settings tab, set the key-value pair data for the ConfigMap, then click Create.

    • Click Add Data to add a key-value pair.

    • Hover over the created pair, then click pen on the right to edit the pair.

    • Hover over the created pair, then click trash-light on the right to delete the pair.

    Once created, the ConfigMap will be displayed in the ConfigMap list.