Configuration(Configuration) Management
When you need to manage values that change inside a container across various environments such as development and production, creating separate images to handle them via environment variables is inconvenient and costly. In Kubernetes, you can manage environment variables or configuration values as variables so they can be changed externally and injected when a Pod is created; at this point, you can use ConfigMap and Secret.
ConfigMaps and Secrets are defaulted to the cluster (namespace) selected when creating the service. Even if you select a different item in the list, the default cluster (namespace) setting is retained.
- To select a different cluster (namespace), click the gear button on the right side of the list. * Cluster/Namespace Settings In the popup window, select the cluster and namespace to change, and click the Confirm button. * You can view the ConfigMaps and Secret services created in the selected cluster/namespace.
Managing ConfigMaps
Config information used in a namespace can be defined in a ConfigMap and managed.
Create ConfigMap
To create a ConfigMap, follow these steps.
- Click the All Services > Container > Kubernetes Engine menu. 1. Go to the Service Home page of Kubernetes Engine.
- On the Service Home page, click ConfigMap under the Configuration menu. 2. Navigate to the ConfigMap List page.
- On the ConfigMap List page, select the cluster and namespace from the gear button at the top left, then click Create Object.
- Enter the object information in the Object Creation Popup and click the Confirm button.
View ConfigMap detailed information
To view detailed ConfigMap information, follow these steps.
- Click the All Services > Container > Kubernetes Engine menu. 1. Go to the Service Home page of Kubernetes Engine.
- On the Service Home page, click ConfigMap under the Configuration menu. 2. Navigate to the ConfigMap list page.
- On the ConfigMap List page, select the cluster and namespace from the gear button at the top left, then click Confirm.
- Select the item you want to view detailed information for on the ConfigMap List page. 4. Go to the ConfigMap Details page.
- If you select Show system objects at the top of the list, all items except the Kubernetes object entries will be displayed.
- Click each tab to view the service information.
Category Detailed descriptionDelete ConfigMap Delete ConfigMap Detailed Information Detailed ConfigMap information can be viewed YAML The resource file of a ConfigMap can be edited in the YAML editor - Click the Edit button, modify the resource, then click the Done button to apply the changes
- When editing content, you can click the Diff button to view the changed content
event Check events that occurred in the ConfigMap Account Information Check basic information about the Account, such as name, location, and creation time. Metadata Information Check the metadata information of the ConfigMap Object Information Check the object information of the ConfigMap - Data separates rows with
- - -, and value is displayed in a textarea format - Binary data’s value outputs the length value
Table. ConfigMap detailed information items
Delete ConfigMap
To delete a ConfigMap, follow these steps.
- Click the All Services > Container > Kubernetes Engine menu. 1. Go to the Service Home page of Kubernetes Engine.
- On the Service Home page, click ConfigMap under the Configuration menu. 2. Go to the ConfigMap list page.
- On the ConfigMap List page, select the cluster and namespace from the gear button at the top left, then click Confirm.
- On the ConfigMap List page, select the item you want to delete. 4. Navigate to the ConfigMap Details page.
- On the ConfigMap Details page, click Delete ConfigMap.
- When the notification confirmation window appears, click the Confirm button.
Managing Secrets
Using secrets allows you to securely store and manage sensitive information such as passwords, OAuth tokens, and SSH keys.
Create Secret
To create a secret, follow these steps.
- Click the All Services > Container > Kubernetes Engine menu. 1. Go to the Service Home page of Kubernetes Engine.
- On the Service Home page, click Secret under the Configuration menu. 2. Go to the Secret List page.
- On the Secret List page, select the cluster and namespace from the gear button at the top left, then click Create Object.
- In the Object Creation Popup, enter the object information and click the Confirm button.
Check secret detailed information
To view the secret details, follow these steps.
- Click the All Services > Container > Kubernetes Engine menu. 1. Go to the Service Home page of Kubernetes Engine.
- On the Service Home page, click Secret under the Configuration menu. 2. Go to the Secret List page.
- On the Secret List page, select the cluster and namespace from the gear button at the top left, then click Confirm.
- Select the item you want to view detailed information for on the Secret List page. 4. Go to the Secret Details page.
- If you select Show system objects at the top of the list, all items except the Kubernetes object entries will be displayed.
- Click each tab to view the service information.
Category Detailed descriptionDelete secret Delete the secret Detailed Information Detailed information of the secret can be viewed YAML The secret’s resource file can be edited in the YAML editor - Click the Edit button, modify the resource, then click the Done button to apply the changes
- When editing content, you can click the Diff button to view the changed content
event View events that occurred within the secret Account information Check basic information about the Account, such as name, location, and creation timestamp. Metadata Information Check the secret’s metadata information Object Information Check the secret object’s information Table. Secret detailed information items
Delete secret
To delete the secret, follow these steps.
- All Services > Container > Kubernetes Engine Click the menu. 1. Navigate to the Service Home page of Kubernetes Engine.
- On the Service Home page, click Secret under the Configuration menu. 2. Go to the Secret List page.
- On the Secret List page, select the cluster and namespace from the gear button at the top left, then click Confirm.
- Select the items you want to delete on the Secret List page. 4. Navigate to the Secret Details page.
- On the Secret Details page, click Delete Secret.
- When the notification confirmation window appears, click the Confirm button.