# Configuration Information Creation

## What types of configuration information are provided?

* ConfigMap: ConfigMap is a Kubernetes object for injecting configuration data into containers.
* Secret: Secret is a Kubernetes object that includes sensitive data such as passwords, tokens, and key values. Kubernetes defines types like Docker-registry, generic, and tls for secrets, and Cocktail Cloud supports all these types.

## What are the advantages of configuration information management?

### Ease of configuration and utilization

When users create configuration information in Key-Value format in the configuration information management menu, they can easily select the configuration information to be used in containers from the dropdown menu during container configuration.

## Task List

* Create ConfigMap
* Create Secret
* View Configuration Information
* Use Configuration Information in Workloads

## 1. Create ConfigMap

### 1.1 Move to Configuration Information Screen

1\) Go to \[Application] - \[Service Map] tab, select Configuration Information, click the "+ Create" button, then choose ConfigMap.

<figure><img src="/files/PMD8A9ucQsKOuSIikrps" alt=""><figcaption><p>[Screen] Access Configuration Information for Service Map</p></figcaption></figure>

### 1.2 Enter Basic Information

1\) Enter the name, description, labels, and annotations for the ConfigMap.

<figure><img src="/files/n6fY3fmcBST7nZZVQQMN" alt=""><figcaption><p>[Screen] Enter Basic Information for Config Map</p></figcaption></figure>

<table><thead><tr><th width="176">Item (* is required)</th><th>Content</th></tr></thead><tbody><tr><td>Name*</td><td>Enter the name for the Config Map to be created (use only uppercase, lowercase, numbers, and special characters (-.))</td></tr><tr><td>Description</td><td>Provide a description for the Config Map to be created</td></tr><tr><td>Label</td><td>Input the labels to be written in the Config Map</td></tr><tr><td>Annotation</td><td>Enter any Annotation you want for the Config Map</td></tr></tbody></table>

### 1.3 Enter Key-Value Information

1\) Click the "+ Add" button on the bottom right of the ConfigMap information input screen to enter key-value information, then click "Apply." If managing multiple key-value information in the ConfigMap, repeat the key-value information entry as needed.

<figure><img src="/files/naQ7eGjNa3GwcxCzSFxM" alt=""><figcaption><p>[Screen] Enter Key-Value Information for Config Map</p></figcaption></figure>

{% hint style="info" %}

* The KEY field is a required input.
  {% endhint %}

### 1.4 Save

1\) After entering ConfigMap information, click the "Save" button to actually create it.

## 2. Create Secret

### 2.1 Move to Configuration Information Screen

1\) Go to \[Application] - \[Service Map] tab, select Configuration Information, click the "+ Create" button, then choose Secret.

<figure><img src="/files/yFDjuIjGhjdPrTz9fiJj" alt=""><figcaption><p>[Screen] Access Configuration Information for Service Map</p></figcaption></figure>

### 2.2 Enter Basic Information

<figure><img src="/files/UsUnmgCZGWdPFnZ4U8t2" alt=""><figcaption><p>[Screen] Enter Basic Information for Secret</p></figcaption></figure>

<table><thead><tr><th width="176">Item (* is required)</th><th>Content</th></tr></thead><tbody><tr><td>Name*</td><td>Enter the name for the Config Map to be created (use only uppercase, lowercase, numbers, and special characters (-.))</td></tr><tr><td>Description</td><td>Enter a description for the Config Map to be created</td></tr><tr><td>Type</td><td><ul><li>Generic:</li><li>DockerRegistry:</li><li>TLS: Certificates for public certification registration</li></ul></td></tr><tr><td>Label</td><td>Input the labels to be written in the Config Map</td></tr><tr><td>Annotation</td><td>Enter any Annotation you want for the Config Map</td></tr></tbody></table>

### 2.3 Enter Key-Value Information

1\) Click the "+" button on the bottom right of the Secret information input screen to enter key-value information. If managing multiple key-value information in the Secret, repeat the key-value information entry as needed.

<figure><img src="/files/BCy8Bt2PUhsnJduT7IGF" alt=""><figcaption><p>[Screen] Enter Key-Value Information for Secret</p></figcaption></figure>

{% hint style="info" %}

* The KEY field is a required input.
  {% endhint %}

### 2.4 Save

1\) After entering Secret information, click the "Save" button to actually create it.

### 2.5 Creating imagePullSecrets

> The previous method of forcibly generating and assigning imagePullSecrets in Cocktail is no longer used. Users can now directly create imagePullSecrets as needed and use them in their workloads. (imagePullSecrets provide authentication tokens in the form of Kubernetes Secrets, storing Docker authentication information used to access private registries.)

1\) In the \[Application] - \[Service Map] tab, select the service map where you want to create the secret, and go to the settings information, then click the "+ Create" button.

2\) Click on "Secret."

<figure><img src="/files/pNkcBFlxq9I9FJMvaZvO" alt=""><figcaption><p>[Screen] Create Secret</p></figcaption></figure>

<figure><img src="/files/gshppi23f1ZLaqsJIDky" alt=""><figcaption><p>[Screen] Enter Secret Information</p></figcaption></figure>

<table><thead><tr><th width="181.23280423280426">Item(* is required)</th><th>Content</th></tr></thead><tbody><tr><td>Name*</td><td>Enter the name of the Secret to be created</td></tr><tr><td>Description</td><td>Provide a description for the Secret</td></tr><tr><td>Type*</td><td>Select DockerRegistry to store authentication information for pulling images from a Docker registry.</td></tr><tr><td>Label</td><td>Specify Key / Value pairs to identify the information</td></tr><tr><td>Annotation</td><td>Used for additional explanation without any special functionality</td></tr><tr><td>Setting type*</td><td><ul><li>Direct input : Manually enter the registry authentication information</li><li>Select from registry: Choose from previously registered registries</li></ul></td></tr><tr><td>Registry</td><td>Select from previously registered registries</td></tr></tbody></table>

## 3. View Configuration Information

### 3.1 List Configuration Information

1\) Go to \[Application] - \[Service Map] tab, select Configuration Information to view the list of configuration information.

<figure><img src="/files/fvE8h1MlLeaS41C8Kdfo" alt=""><figcaption><p>[Screen] View List of Configuration Information</p></figcaption></figure>

### 3.2 View Detailed Information of Configuration Information

1\) Select the name of the configuration information to see its details.

<figure><img src="/files/eVcEw0xlE9mM9YmuUPCx" alt=""><figcaption><p>[Screen] View Detailed Configuration Information</p></figcaption></figure>

2\) Detailed information of the configuration information can also be viewed in YAML format. Move to the configuration tab in the upper right corner of the screen, then select "YAML View" from the displayed screen. YAML-formatted information will be shown.

<figure><img src="/files/M95B6JCcJtA5TQoEsPJU" alt=""><figcaption><p>[Screen] View Configuration Information in YAML Format</p></figcaption></figure>

## 4. Use Configuration Information in Workloads

1\) Select the workload that will use the configuration information and go to the configuration tab to display the detailed configuration screen for the workload.

<figure><img src="/files/rcawk174SrIfwU7Lm90D" alt=""><figcaption><p>[Screen] Detailed Configuration Screen for Workload</p></figcaption></figure>

### 4.1 Set Environment Variables in Containers

1\) Select the container name and go to the \[Environment Variables] tab.

<figure><img src="/files/tZYXrVUjk4XNyQ4fG7ME" alt=""><figcaption><p>[Screen] Container Environment Variable Configuration Screen</p></figcaption></figure>

2\) Choose the type of configuration information you want to use.

If you have selected a ConfigMap value or a Secret value, you can easily select the key-value of the configuration information resource and the key-value it contains. After accessing the selected key-value of the configuration information in the container, enter the corresponding environment variable key-value separately, then click the "Apply" button.

<figure><img src="/files/X6zknoXLgG06QcqOUGFt" alt=""><figcaption><p>[Screen] Select Configuration Information and Enter Environment Variable Key-Value</p></figcaption></figure>

{% hint style="info" %}

* The KEY and VALUE fields for direct input, ConfigMap value, Secret value, Field Ref, Resource Field Ref are mandatory.
  {% endhint %}

### 4.2 Restart the Workload

1\) To apply the environment variables, a restart of the container is required. Click the "Save and Start" button at the top right of the detailed configuration screen for the workload to restart it.

### 4.3 Confirm the Application of Environment Variables

1\) In the detailed deployment information view of the workload, find the container with the applied environment variables, then click the terminal icon on the right. Clicking the terminal icon displays an interactive shell screen for that container. In the interactive shell, use the `env` command to display and confirm that the environment variable content is correctly set.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cocktailcloud.gitbook.io/cocktail-cloud-online-en/application/configmap-secret.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
