Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

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 Secrets

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

Secrets are user-defined resources that store authentication and sensitive information such as application keys. They can be used as files or environment variables in applications.

Prerequisites

Creating a Secret

  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 Secret page.

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

  6. Click Create.

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

      Parameter

      Description

      *Name

      Secret name, which must be unique in the same 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 secret will be used.

      Click Create Cluster to create a CCE cluster. For details, see Buying a Cluster. Create a CCE Turbo or CCE Standard cluster based on your service requirements.

      *Namespace

      Namespace to which the secret belongs.

      Click Create Namespace to create a namespace for the secret by referring to Creating a Namespace.

      Description

      Secret description. Enter 0 to 255 characters.

      *Secret Type

      Select the type of the secret to be created based on service requirements.

      • Opaque: general secret type. If the secret type is not explicitly set in the secret configuration file, the default secret type is Opaque.
      • kubernetes.io/dockerconfigjson: a secret that stores the authentication information required for pulling images from a private repository.
      • IngressTLS: a secret that stores the certificate required by ingresses (layer-7 load balancing services).
      • Other: Enter a secret type that is none of the above. Enter 4 to 24 characters.

      *Repository Address

      This parameter is valid only when Secret Type is set to kubernetes.io/dockerconfigjson. Enter the image repository address.

      *Secret Data

      Value of the data field in the application secret file.

      • If the secret type is Opaque, enter the key and value.

        The key contains 1 to 63 characters. Only use digits, letters, dots (.), hyphens (-), and underscores (_).

        The value contains 1 to 1,048,576 characters after Base64 encoding. For details, see Base64 Encoding.

        Click Add Data to add secret data.

      • If the secret type is kubernetes.io/dockerconfigjson, enter the username and password.
      • If the secret type is IngressTLS, click Upload File and upload the certificate file and private key file.

        The certificate file must be less than 1 MB and in .crt or .cer format. The private key file must be less than 1 MB and in .key or .pem format.

      • If the secret type is Other, enter the key and value.

        The key contains 1 to 63 characters. Only use digits, letters, dots (.), hyphens (-), and underscores (_).

        The value contains 1 to 1,048,576 characters after Base64 encoding. For details, see Base64 Encoding.

        Click Add Data to add secret data.

      Secret Label

      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 secret parameters in Visualization mode
    • Method 2: YAML
      NOTE:

      To create a secret by uploading a file, ensure that a secret resource file in YAML format has been created and the file size is less than 1 MB. For details, see Secret Resource File Configuration Example.

      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 created secret file, and click Open. Wait until the file is uploaded.
        • Write or modify the secret resource file in Orchestration content.
      Figure 2 Setting secret parameters in YAML mode

  7. Click Create Secret.

    The new secret is displayed in the secret list.

Follow-up Operations

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

NOTE:
  • After a secret is deleted, the component to which the secret is mounted or referenced in environment variables may fail to be started after being upgraded.
  • The secret list contains system secrets, which can only be viewed and cannot be modified or deleted.
Table 2 Secret management operations

Operation

Description

Searching for a secret

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

Viewing a secret

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

Updating a secret

  1. Click Update in the Operation column of the target secret.
  2. Modify the information according to Table 1.
  3. Click Modify Secret.

Deleting a secret

  1. Click Delete in the Operation column of the target secret.
  2. In the displayed dialog box, click OK.

Deleting secrets in batches

  1. Select the secrets to be deleted.
  2. Click Delete Key.
  3. In the displayed dialog box, click OK.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback