This section describes how to create a Secret.

Prerequisites

  • The Application Management for Cluster Federation extension must be installed and enabled on the KubeSphere platform.

  • You need to join a federated project and have the Federated Project Management permission in the corresponding workspace.

Steps

  1. Log in to the KubeSphere web console as a user with Federated Project Management permissions and enter your federated project.

  2. Click Configuration > Secrets in the left navigation pane.

  3. Click Create on the page.

  4. 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.

    Project

    The project to which the Secret belongs.

    Description

    The description of the Secret. The description can contain any characters and has a maximum length of 256 characters.

  5. 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.

  6. 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 pen on the right to edit the data entry.

      • Hover over an existing data entry, then click trash-light 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 eye/eye-closed 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 eye/eye-closed to show/hide the password in plain text.

    Once created, the Secret will appear in the Secret list.