هذه الصفحة غير متوفرة حاليًا بلغتك المحلية. نحن نعمل جاهدين على إضافة المزيد من اللغات. شاكرين تفهمك ودعمك المستمر لنا.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Managing Configuration Items

Updated on 2024-12-16 GMT+08:00

Configuration items (ConfigMaps) are user-defined resources that store application configurations. They can be used as files or environment variables in applications.

Configuration items allow you to decouple configuration files from images to enhance the portability of applications.

Benefits of configuration items:

  • Manage configurations for different environments and services.
  • Deploy an application in different environments using the same configuration. You can maintain configuration files in multiple versions, which makes it easy to update and roll back applications.
  • Quickly import configurations as a file to an application.

CCE cluster 1.11.7-r2 and later support Kubernetes RBAC authorization and namespace permission configuration. You can regulate users' or user groups' access to Kubernetes resources in a single namespace based on their Kubernetes RBAC roles. For details, see Namespace Permissions.

If a CCE cluster 1.11.7-r2 or later is bound in the environment and namespace permissions are configured, you must have the administrator permission (cluster-admin) for all namespaces in the cluster or the development permission (admin) for a single namespace to be operated to manage namespaces.

This section describes how to create, view, update, and delete configuration items for the CCE cluster bound to a Kubernetes environment.

Prerequisites

Creating a Configuration Item

  1. Log in to ServiceStage.
  2. Choose Environment Management. The Environment Management page is displayed.
  3. Click the target environment. The Overview page is displayed.
  4. Choose Cloud Container Engine from Compute.
  5. Go to the ConfigMap page.

    • For a non-HA environment, click the ConfigMap tab.
    • For an HA environment, click the bound CCE cluster and click the ConfigMap tab.

  6. Click Create Configuration Item.

    ServiceStage allows you to create configuration items in Visualization or YAML mode.
    • Method 1: Visualization
      Configure the configuration item by referring to Table 1. Parameters marked with an asterisk (*) are mandatory.
      Table 1 Parameters for creating a configuration item in visualization mode

      Parameter

      Description

      *Configuration Name

      Configuration item name, which must be unique in a namespace.

      Enter 4 to 24 characters. Start with a lowercase letter and end with a lowercase letter or digit. Only use lowercase letters, digits, and hyphens (-).

      *Cluster

      Cluster where the configuration item will be used.

      *Namespace

      Namespace to which the configuration item belongs.

      Description

      Configuration item description. Enter 0 to 255 characters.

      Configuration Data

      Configuration data to be used in applications or used to store configuration data. Key indicates a file name, and Value indicates the content in the file.

      1. Click Add Data.
      2. Enter the key and value.
        • The key contains 1 to 63 characters. Only use digits, letters, dots (.), hyphens (-), and underscores (_).
        • The value contains 0 to 1,048,576 characters.

      Configuration Labels

      Labels that you want to attach to various objects (such as applications, nodes, and services) in the form of key-value pairs. Labels define the identifiable attributes of these objects and are used to manage and select the objects.

      1. Click Add.
      2. Enter the key and value.
        • The key contains 1 to 63 characters. Start and end with a letter or digit. Only use digits, letters, dots (.), hyphens (-), underscores (_), and slashes (/).
        • The value contains 1 to 63 characters. Start and end with a letter or digit. Only use digits, letters, dots (.), hyphens (-), and underscores (_).
      Figure 1 Setting configuration item parameters in Visualization mode
    • Method 2: YAML
      NOTE:

      To create a configuration item by uploading a file, ensure that a configuration item resource file in YAML format has been created and the file size is less than 1 MB. For details, see Requirements for the Configuration Item Resource File.

      1. Select a cluster from the Cluster drop-down list.
      2. Use either of the following methods to set the configuration item resource file:
        • Click Upload File, select the configuration item resource file created locally, click Open, and wait until the file is uploaded.
        • Write or modify the ConfigMap resource file in Orchestration content.
      Figure 2 Setting configuration item parameters in YAML mode

  7. Click Create ConfigMap.

    After the configuration item is created, it is displayed in the configuration item list.

Follow-up Operations

After a configuration item is created, you can search for, view, update, and delete the configuration item by referring to Table 2.

NOTICE:
  • After a configuration item is deleted, the component to which the configuration item is mounted or referenced in environment variables may fail to be started after being upgraded.
  • System configuration items can only be viewed.
Table 2 Configuration item management operations

Operation

Description

Searching for a configuration item

  1. Select the namespace to which the configuration item belongs from the namespace drop-down list.
  2. Enter a configuration item name in the search box.

Viewing a configuration item

Click Show YAML in the Operation column of the target configuration item to view the content of the YAML file of the configuration item.

Editing a configuration item

To update data, labels, and description in a configuration item in YAML mode, perform the following operations:

  1. Click Edit YAML in the Operation column of the target configuration item.
    For details about the configuration item YAML file, see Requirements for the Configuration Item Resource File. You can use either of the following methods to edit a YAML file:
    • Edit the YAML file of the configuration item to be operated in the editing area.
    • Click Import YAML File to import the edited YAML file of the target component.
  2. Click Save.

Modifying a configuration item

  1. Click More > Update in the Operation column of the target configuration item.
  2. Modify data, labels, and description of the configuration item according to the Table 1.
  3. Click Update Configuration Item.

Deleting a configuration item

  • Single deletion
    1. Click More > Delete in the Operation column of the target configuration item.
    2. In the displayed dialog box, click OK.
  • Batch deletion
    1. Select the configuration items to be deleted.
    2. Click Delete Configuration Item.
    3. In the displayed dialog box, click OK.

Requirements for the Configuration Item Resource File

A configuration item resource file should be in YAML format, and the file size cannot exceed 1 MB.

Example:

apiVersion: v1
data: {}
kind: ConfigMap
metadata:
  annotations:
    description: ''
  labels: {}
  name: configmap-ww8qkl
  namespace: cse

For details about key parameters, see Table 3.

Table 3 Key parameters of a configuration item

Parameter

Description

apiVersion

Fixed value: v1.

kind

Fixed value: ConfigMap.

metadata.name

Configuration item name, which can be customized.

data

Configuration item data in key-value pair format.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback