You need to enable JavaScript to run this app.
Volcengine Kubernetes Engine

Volcengine Kubernetes Engine

Copy page
Download PDF
Configuration management
Creating Secrets
Copy page
Download PDF
Creating Secrets
A Secret is an encrypted storage resource object designed to securely store sensitive data such as credentials, certificates, and private keys. By keeping this data out of images or pod definitions, Secrets enhance security while maintaining operational flexibility.‌​
Procedure​
​
Use the console
Create through YAML
​
  1. Log in to the VKE console. ​
  1. In the left navigation bar, click Cluster.​
  1. In the cluster list, click the name of the target cluster.​
  1. In the left navigation pane of the cluster management page, click Configurations > Secret. On the Secret page, click Create Secret.​
  • ​
    Parameter​
    Description​
    Name​
    Enter a name that follows the displayed naming rules. The name must be unique within the same namespace.​
    Namespace​
    Select a namespace where you want the Secret to belong. We recommend selecting a custom namespace or the system-created default namespace. For details about namespaces, see Namespace overview.​
    Type​
    Specify a Secret type:​
    • Key (Opaque): stores generic keys. If you select this option, you need to configure keys in the Configuration content section. You can do this using one of the following methods:​
    • Add key-value pair: set a key name and value in the Secret. You can include multiple key-value pairs in a Secret. Values can be empty, and no validation is performed.​
    • Upload local file: upload a local key configuration file. You can upload multiple files.​
    warning​
    For security reasons, uploading binary text via the console is not supported. However, you can use the kubectl command to upload binary text if necessary. For kubectl command details, see Kubernetes documentation.​
    • Repository key (Dockerconfigjson): stores credentials for accessing a private container image registry. You also need to set the following items:​
    • Repository address: the address of a private image repository, for example, cr-****-cn-beijing.cr.volces.com/demo/****.​
    • Username: the username for logging in to the private image repository.​
    • Password: The password for logging in to the private image repository.​
    • Certificate (TLS): stores certificates required by load balancers. You also need to set the following items:​
    • Upload certificate: upload a TLS certificate file. You can upload only one to a Secret of this type.​
    • Upload key: Upload a TLS key file. You can upload only one to a Secret of this type.​
    warning​
    After you create a Secret, you cannot change its type.​
    Tag​
    (Optional) Create Kubernetes labels to specify identifying attributes of this Secret. Click Add new and then enter a key-value pair that complies with the on-screen requirements.​
    Annotation​
    (Optional) Create Kubernetes annotations to attach non-identifying metadata to this Secret for efficient metadata retrieval. Annotations can contain characters that are not permitted in labels. Click Add annotation and then enter a key-value pair that complies with the on-screen requirements.​
    ​
  1. Click Confirm.​
​
Results​
After completing the operation, you can select the target namespace to view the created Secret in the Secret list.​
Last updated: 2026.07.24 14:51:38