Configuration Information Creation

Cocktail Cloud provides ConfigMap and Secret types as configuration information.

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.

1.2 Enter Basic Information

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

Item (* is required)Content

Name*

Enter the name for the Config Map to be created (use only uppercase, lowercase, numbers, and special characters (-.))

Description

Provide a description for the Config Map to be created

Label

Input the labels to be written in the Config Map

Annotation

Enter any Annotation you want for the Config Map

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.

  • The KEY field is a required input.

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.

2.2 Enter Basic Information

Item (* is required)Content

Name*

Enter the name for the Config Map to be created (use only uppercase, lowercase, numbers, and special characters (-.))

Description

Enter a description for the Config Map to be created

Type

  • Generic:

  • DockerRegistry:

  • TLS: Certificates for public certification registration

Label

Input the labels to be written in the Config Map

Annotation

Enter any Annotation you want for the Config Map

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.

  • The KEY field is a required input.

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

Item(* is required)Content

Name*

Enter the name of the Secret to be created

Description

Provide a description for the Secret

Type*

Select DockerRegistry to store authentication information for pulling images from a Docker registry.

Label

Specify Key / Value pairs to identify the information

Annotation

Used for additional explanation without any special functionality

Setting type*

  • Direct input : Manually enter the registry authentication information

  • Select from registry: Choose from previously registered registries

Registry

Select from previously registered registries

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.

3.2 View Detailed Information of Configuration Information

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

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.

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.

4.1 Set Environment Variables in Containers

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

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.

  • The KEY and VALUE fields for direct input, ConfigMap value, Secret value, Field Ref, Resource Field Ref are mandatory.

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.

Last updated

ⓒ2023. Acornsoft Corp. All rights reserved.