> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scitix.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure ConfigMaps and Secrets for Workloads

> Choose ConfigMap or Secret based on configuration sensitivity, then create and maintain the configuration required by workloads.

Workloads can read runtime configuration through ConfigMaps and Secrets. Configuration objects and the workloads that reference them must be in the same namespace.

## Select a Configuration Object

First, select objects based on whether the configuration content is sensitive, to avoid mistakenly storing credentials in a ConfigMap.

| Configuration Object | Suitable Content to Store |
| - | - |
| ConfigMap | Non-sensitive information such as run modes, log levels, environment variables, or configuration files. |
| Secret | Passwords, tokens, certificates, or other sensitive information. |

## Using ConfigMap

### Create ConfigMap

1. Log in to the [GPU Cloud console](https://console.scitix.ai/gpu-cloud/home) and go to the **Clusters** page.

2. Click the target cluster name to go to the cluster workspace.

3. In the left navigation pane, click **Configure**.

4. Switch to the **ConfigMap** tab and click **Create**.

5. Enter the name, namespace, and configuration details.

   The following YAML creates a ConfigMap that includes the runtime mode and log level. Modify it as needed for the workload.

   ```yaml theme={null}
   apiVersion: v1
   kind: ConfigMap
   metadata:
     name: app-config
     namespace: default
   data:
     APP_MODE: production
     LOG_LEVEL: info
   ```

6. Submit the creation. After returning to the **ConfigMap** tab and confirming that the ConfigMap has been created, reference it in the workload.

### Modify or Delete a ConfigMap

> [!WARNING]
>
> Modifying or deleting a ConfigMap may affect workloads that reference this configuration. Before proceeding, confirm the scope of impact and update workload configurations as needed.

1. On the **ConfigMap** tab, filter by namespace or use the search box to locate the target ConfigMap.

2. Perform actions as needed:

   * Check the configuration: Click **YAML**.
   * Modify the configuration: Click **Edit**, make the changes, and submit them.
   * Delete the configuration: Click **Delete** and confirm as prompted.

## Using Secrets

### Create Secret

> [!WARNING]
>
> Do not include real passwords, tokens, certificates, or other sensitive information in Public documents, Public repositories, or Logs.

1. On the **Clusters** page, click the name of the target cluster to open the cluster workspace.

2. In the left navigation pane, click **Configure**.

3. Switch to the **Secret** tab and click **Create**.

4. Enter the name, namespace, Secret type, and Secret content.

   The following YAML shows the structure of an `Opaque` Type Secret. Replace the example values with credentials used by your application, and manage the content in a controlled manner.

   ```yaml theme={null}
   apiVersion: v1
   kind: Secret
   metadata:
     name: app-secret
     namespace: default
   type: Opaque
   stringData:
     username: REPLACE_WITH_USERNAME
     password: REPLACE_WITH_PASSWORD
   ```

5. Submit the creation request, return to the **Secret** tab, confirm that the Secret has been created, and then reference it in the workload.

### Modify or Delete a Secret

> [!WARNING]
>
> Modifying or deleting a Secret may prevent workloads that reference it from obtaining credentials, certificates, or tokens. Before proceeding, confirm the workloads and automated processes that use this Secret.

1. On the **Secret** tab, filter by namespace or use the search box to locate the target Secret.

2. Perform actions as needed:

   * Check the configuration: Click **YAML**.
   * Modify the configuration: Click **Edit**, make the changes, and submit them.
   * Delete the configuration: Click **Delete**, then confirm as prompted.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.