Updated on 2022-11-23 GMT+08:00

Creating a ConfigMap

Create a ConfigMap to store the database information required by the agent container workload. The ConfigMap is used as a file in the workload.

Procedure

  1. In the navigation pane, choose Configuration Center > ConfigMaps. Click Create ConfigMap.
  2. Configure parameters on the Create ConfigMap page, For more information, see Table 1.

    Table 1 Parameters

    Parameter

    Description

    Example Value

    Name

    Name of a ConfigMap, which must be unique in a namespace.

    db-config-for-default

    Cluster

    Cluster to be audited

    scc-cmv-bj4

    Namespace

    Namespace of the cluster

    default

    Description

    Description of the ConfigMap

    -

    Data

    Database IP address required by the workload. Perform the following steps to configure it:

    1. Click Add Data.
    2. Set Key to db_config.
    3. Set Value to the IP addresses of the databases to be audited. Use commas (,) to separate multiple IP addresses.

    Set Key to db_config.

    Set Value to 192.168.1.31,192.168.0.159

    To create a ConfigMap for VPC, click Add Data and set Key and Value.

    • Key: vpc_config
    • Value: VPC ID of the CCE cluster that the workload belongs to

  3. Click Create.