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.
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.
View Configuration Information
Use Configuration Information in Workloads
1. Create ConfigMap
1) Go to [Application] - [Service Map] tab, select Configuration Information, click the "+ Create" button, then choose ConfigMap.
[Screen] Access Configuration Information for Service Map 1) Enter the name, description, labels, and annotations for the ConfigMap.
[Screen] Enter Basic Information for Config Map Item (* is required)
Content
Enter the name for the Config Map to be created (use only uppercase, lowercase, numbers, and special characters (-.))
Provide a description for the Config Map to be created
Input the labels to be written in the Config Map
Enter any Annotation you want for the Config Map
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.
[Screen] Enter Key-Value Information for Config Map 1) After entering ConfigMap information, click the "Save" button to actually create it.
2. Create Secret
1) Go to [Application] - [Service Map] tab, select Configuration Information, click the "+ Create" button, then choose Secret.
[Screen] Access Configuration Information for Service Map [Screen] Enter Basic Information for Secret Item (* is required)
Content
Enter the name for the Config Map to be created (use only uppercase, lowercase, numbers, and special characters (-.))
Enter a description for the Config Map to be created
TLS: Certificates for public certification registration
Input the labels to be written in the Config Map
Enter any Annotation you want for the Config Map
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.
[Screen] Enter Key-Value Information for Secret 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."
[Screen] Enter Secret Information Item(* is required)
Content
Enter the name of the Secret to be created
Provide a description for the Secret
Select DockerRegistry to store authentication information for pulling images from a Docker registry.
Specify Key / Value pairs to identify the information
Used for additional explanation without any special functionality
Direct input : Manually enter the registry authentication information
Select from registry: Choose from previously registered registries
Select from previously registered registries
1) Go to [Application] - [Service Map] tab, select Configuration Information to view the list of configuration information.
[Screen] View List of Configuration Information 1) Select the name of the configuration information to see its details.
[Screen] View Detailed Configuration Information 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.
[Screen] View Configuration Information in YAML Format 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.
[Screen] Detailed Configuration Screen for Workload 4.1 Set Environment Variables in Containers
1) Select the container name and go to the [Environment Variables] tab.
[Screen] Container Environment Variable Configuration Screen 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.
[Screen] Select Configuration Information and Enter Environment Variable Key-Value 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.