K8s Secret separates sensitive information from application code. This lets you securely pass and use sensitive information in your applications. This topic describes how to inject a secret from an SAE namespace into a container.
Prerequisites
A K8s Secret is created in the namespace. For more information, see Manage and use secrets (K8s Secret).
Procedure
The following contents describe the procedure for different scenarios:
Create an application
Log on to the SAE console. In the left-side navigation pane, choose . On the page that appears, select a region in the top navigation bar and a namespace from the Namespace drop-down list, and then click Create Application.
After the Basic Information is specified on Create Application page, click Next: Advanced Settings.
Modify running applications
WarningAfter you redeploy an application, the application is restarted. To prevent unpredictable errors such as business interruptions, we recommend that you deploy applications during off-peak hours.
Log on to the SAE console. In the left-side navigation pane, choose . On the page that appears, select a region in the top navigation bar and a namespace from the Namespace drop-down list, and then click the desired application name.
On the Basic Information page of the application, click Deploy Application.
Modify stopped applications
Log on to the SAE console. In the left-side navigation pane, choose . On the page that appears, select a region in the top navigation bar and a namespace from the Namespace drop-down list, and then click the desired application name.
On the Basic Information page of the application, click Modify Application Configurations.
Expand the Secret area and configure the parameters.
Configuration details
You can create a secret on the Namespaces page in advance, or click Create a Secret in the Secret configuration section.
Click +Add, select an existing The name of the secret and a Key, and then enter a Mount Path.
To mount all keys, select All from the Key drop-down list. This mounts all keys from the secret to the specified path.
