Deploy applications

Create a namespace

Configure namespaces to implement logical isolation between applications. A Deployment must belong to a namespace.

To create a namespace:

  1. On the top navigation bar, click Cloud Services, and then select Multi-Cloud Container Management from the Container Service menu.

  1. From the left navigation pane, select Resource Management > Namespaces.

  1. Select a main cluster instance on the top of the page, and then click Create.

  1. Configure the parameters as described in "Parameters."

  1. Click OK.

Parameters

Parameter

Description

Namespace

Enter a name for the namespace.

Label Name

Enter a label name.

Configure labels for a namespace to facilitate query.

Value

Enter a label value.

Description

Enter a description for the namespace.

 

Deploy an application

After creating a main cluster instance and incorporate member clusters to the instance, you can deploy container applications on the following pages:

To deploy an application on the Deployments page:

  1. On the top navigation bar, click Cloud Services, and then select Multi-Cloud Container Management from the Container Service menu.

  1. From the left navigation pane, select Workload > Deployments.

  1. Click Create.

  1. Configure the parameters as described in "Parameters."

  1. Click OK.

Parameters

Parameter

Description

Name

Enter a name for the Deployment, a string of 1 to 39 characters. Valid characters include lower-case letters, digits, and hyphens (-). The name must start with a lower-case letter and must end with a lower-case letter or digit.

Description

Enter a description for the Deployment.

Namespace

Select a namespace for the Deployment, or click Create Namespace to create a new namespace.

Clusters

Select clusters. Make sure the clusters already exist.

Backup Clusters

Select backup clusters. When the primary clusters fail, the backup clusters will take over to provide services. Make sure the selected clusters already exist. You can select backup clusters only when the failover feature is enabled for the main cluster instance.

Image Installation Package

Select the type of the repository where the image or application package resides.

Click Select Installation Package to select an application package or image name and the target version.

To upload images or application packages, click Upload Image. For more information, see Upload an image or Upload an application package.

Environment Variables

Configure environment variables to facilitate container configuration change. A user-defined environment variable cannot be the same as system-defined environment variables. System-defined environment variables include:

  • GRAY_VERSION

  • REGISTRY_TYPE

  • EUREKA_URL

  • CONFIG_URL

  • SERVICE_NAME

  • NAMESPACE

  • JAEGER_AGENT_COMPACT

  • JAEGER_AGENT_ZIPKIN

  • JAEGER_AGENT_BINARY

To add a user-defined environment variable, you can only manually specify the variable name and value. You can click Add to add multiple variables. To add multiple variables at a time, click Bulk Add, enter the variable names and values in the window that opens, and then click OK.

Container Flavor

Configure startup and operation limits for the container. For a parameter, the startup limit value must be smaller than the operation limit value.

  • Startup Limit: Configure the startup limit. When the container starts, the resources (including CPU and memory) that the server allocates to the container cannot be lower than the capacity specified in the startup limit. The startup limit refers to the resources exclusive to an instance, and these resources must be requested when the instance starts. Therefore, the startup limit is the average resource capacity required by the instance during normal operation. If the startup limit is too large, resources will be wasted. If the startup limit is too small, repeated resource requests will reduce the operation efficiency. For a JAVA application, the startup limit = the maximum JVM heap size + 1 GB.

  • Operation Limit: Configure the operation limit. Resources (including CPU and memory) that the container occupied during operation cannot be higher than the capacity specified in the operation limit. The resources are requested and released based on the demands of the container. As a best practice, configure the operation limit based on the actual service needs. If the actual service needs are not clear, you can set the operation limit to 1.5 to 2 times the startup limit.

Differential Policy

When multiple member clusters exist, you can configure differential policies to enable the Deployment to use different image versions and environment variables on in different member clusters.