Configuring Deployments¶
This section shows how the application developer can configure the deployment information for applications to be published.
Prerequisite¶
Before creating a new deployment, you need to complete the application creation and the basic application configuration. For the detailed steps, see Creating an Application.
Creating Deployment¶
The deployment information of the application can be configured using two modes: Config and Yaml. Using the Config mode as an example, create a new deployment for the application with the following steps.
In the project list, click on the project name to enter the project space.
Select Container > Deployments.
Click New Deployment and provide details for the following.
Application Name: Select the application to be deployed.
Environment: Select the application deployment, for which dev, alpha, beta, ppe, and prod environments are supported currently.
Cluster: Select the cluster where the application is deployed. Note that the cluster is already pre-configured by the system.
Replicas: Enter the number of replicas required.
Configure the Resource Quota required to run the application, which includes the CPU and memory quota.
(Optional) Set the Environment Variable and value for running the application.
(Optional) Set the Node Selector label and value for the pods to run on. If not specified, the pods will run on the nodes in the cluster randomly.
(Optional) Select the Config Map that needs to be injected into the container and enter the mount path. For details on configuring the Config Map, see Configuring Config Maps.
(Optional) Select the Secrets that needs to be injected into the container and its mount path. For details on configuring the Secrets, see Configuring Config Maps.
(Optional) Select the Storage for the application and enter the mount path. For details on configuring the storage, see Configuring Storage.
(Recommended) Configure the Readiness Probe for the container to check if the container is ready. The configuration information of the readiness probe includes the detection task timeout time (in seconds), the detection period (in seconds), the number of retry times, the detection initial delay (in seconds), and the handler and parameters of the probe. For details about container probes, see Container probes.
(Optional) Configure the Liveness Probe for the container. The configuration information is similar to the Readiness Probe.
Set the Minimum Ready Seconds of the container (in seconds).
Enter the description for the deployment.
Click OK to complete the configuration.
Managing Deployment¶
After the application deployment configuration is created, you can clone, publish, rollback, scale, edit, or delete the deployment.
Edit by Yaml:Click … > Edit by Yaml,or Click the application name in the list, go to the application details page, switch to the Yaml tab, and edit the Yaml configuration information.
Rolling Update: Click Rolling Update to go to the Rolling Update publish form. Follow the steps in Publishing an Application by Rolling Update to publish the application.
Blue/Green Deployment: Click Blue/Green Deployment to go to the Blue/Green Deployment publish form. Follow the steps in Publishing an Application by Blue/Green Deployment to publish the application.
Clone: Click Clone to reuse the deployment configuration information and quickly create a new deployment.
History Records: Click History Records to view all the history operations of the deployment. Click the View icon to view the history configuration of the deployment, or click Rollback to roll the current deployment back to the selected configuration.
View: Click View to view the configuration details of the deployment.
Autoscaler: Click Autoscaler to change the configuration of replicas, average CPU utilization, and average memory.
Edit: Click the Edit icon to update the deployment configuration information.
Delete: Click the Delete icon to delete the deployment configuration information.