Create a Secret
This section describes how to create a Secret.
Prerequisites
You need to join a project and have the Secret Management permission in the project. For more information, see Project Members and Project Roles.
Steps
-
Log in to the KubeSphere web console with a user who has Secret Management permissions and enter your workspace.
-
Click Configuration > Secrets in the left navigation pane.
-
Select a project from the drop-down list in the upper left corner of the page.
-
Click Create on the page.
-
On the Basic Information tab, set the basic information for the Secret, then click Next.
Parameter Description Name
The name of the Secret. The name can only contain lowercase letters, numbers, and hyphens (-), must start and end with a lowercase letter or number, and has a maximum length of 63 characters.
Alias
The alias of the Secret. Different Secrets can have the same alias.
Description
The description of the Secret. The description can contain any characters and has a maximum length of 256 characters.
-
On the Data Settings tab, select the data type for the Secret from the Type drop-down list.
Type Description Default
Used to store user-defined data.
TLS Information
Used to store TLS certificates and private keys.
Image Service Information
Used to store the address, username, email, and password of an image service.
Username and Password
Used to store usernames and passwords.
-
On the Data Settings tab, set the data for the Secret according to its type, then click Create.
-
For a Secret of type Default, configure the following parameters:
Parameter Description Data
Set user-defined key-value pair data.
-
Click Add Data to set key-value pair data.
-
Hover over an existing data entry, then click
on the right to edit the data entry.
-
Hover over an existing data entry, then click
on the right to delete the data entry.
-
-
For a Secret of type TLS, configure the following parameters:
Parameter Description Certificate
TLS certificate.
Private Key
TLS private key.
-
For a Secret of type Image Registry, configure the following parameters:
Parameter Description Registry Address
The address of the image registry. Click the dropdown list to select HTTP or HTTPS protocol.
Username
The username for accessing the image registry.
Email
The email of the user for accessing the image registry.
Password
The password for accessing the image registry.
-
Click Verify to check if the password is correct.
-
Click
/
to show/hide the password in plain text.
Data
Key-value pair data for accessing the image registry.
-
-
For a Secret of type Username and Password, configure the following parameters:
Parameter Description Username
User-defined username.
Password
User-defined password. Click
/
to show/hide the password in plain text.
Once created, the Secret will appear in the Secret list.
-