Updated at: 2022-12-09 03:49:50
► Configure Container Image
1. Click Add Container Image to add the needed container image, as follows: 

• Select the existing image to make container deployment
Pull the image from public or private image repository. if without image repository address, the image will be pulled from Docker Hub by default. Enter the name of the container and the corresponding image name, which generally requires a specified label, such as, nginx: 1.16.

For efficient scheduling and allocation of cluster resources and better resource utilization, the platform has two restriction types (request and limit) to allocate resources.
The request is usually the minimum resource requirement for the container, while the limit is usually the maximum amount of resources available for the container, with the setting of 0 meaning no limit to the available resources. The request ensures that the Pod has enough resources in running, while the limit prevents one Pod from using unrestricted resources to cause other Pods crashing.
Table 1: CPU Quota
Parameters Description
Minimum (requests) The minimum usage of CPU available for the container, as a dependency for determining resource allocation during container scheduling.
Only if the total usage of CPU allocable on a node ≥ the container CPU minimum usage, can the container be dispatched to the node.
Maximum (limits) The maximum rate of CPU available for the container

Table 2: Memory Quota
Parameters Description
Minimum (requests) The minimum amount of memory required for the container, as a dependency for determining resource allocation during container scheduling.
Only if the total amount of memory allocable on a node ≥ the container memory request, can the container be dispatched to the node.
Maximum (limits) The maximum amount of memory available for the container. If the amount of memory usage exceeds this limit, the container may be killed.
2. For other needs, you can scroll down to the Port Settings and other settings, as follows: 
Parameters Description
Port Settings It is to set the container access policy, specify the exposed port by the container and customize the port name. TCP and UDP can be selected as the port protocol.
Health Checker In terms of business-level monitoring and checking, Kubernetes defines 2 types of health check probes, as detailed in Kubernetes Official Document.
• Survival Probe: Restart the application when the container instance is monitored as unhealthy;
• Ready Probe: Set the workload to unready status when an unhealthy container instance is monitored, so that the business traffic is not imported into the container.
Start Command • Running Command: You can customize the running command of the container start. For the Kubernetes container start command, please refer to Kubernetes Official Document;
• Parameters: You can customize the startup parameters of the container. For the startup parameters of the Kubernetes container, please refer to Kubernetes Official Document.
Environmental Variables The environment variable is a variable set in the container's running environment, with the same effect as "ENV" in Dockerfile, and provides great flexibility in the created workloads.
• Add Environment Variable: Set the environment variable by adding key-value pairs;
• Use ConfigMap or Secret:  Add Secret and ConfigMap as environment variables to store configuration data in the form of key-value pairs, as detailed in Kubernetes Official Document.
Image Pull Policy The default image pull policy is IfNotPresent. If the local image is available, kubelet will no longer pull the image and will use the local image;
To pull the image from the repository every time, you can set the pull policy to Always. For the pull policy as IfNotPresent or Never, the local image will be used first.
3. Click Save after the setting.
► Update Policy
Update Policy includes RollingUpdate and Recreate, as follows: 
• Rolling-update:  It is recommended to use Rolling-update to update Deployment. Rolling-update will gradually replace the old version Pods with the new version Pods. During the upgrade process, the service traffic will be load-balanced to the old and new Pods at the same time, free of service interruption. You can specify the minimum available number of Pods and the maximum number of Pods for update to control the process of rolling-update.
• The minimum available number of Pods: Optional configuration item for the minimum number of survival Pods required for each rolling-upgrade, recommended to be configured as a positive integer with a minimum of 1. The value may be an absolute value (e.g. 5).
• The maximum available number of Pods: Optional configuration item for the allowed maximum number of Pods beyond the number of copies in Deployment during the upgrade.
► Recreate: It will kill all existing Pods before creating a new one, which means that the Recreate will first delete the old Pods and then create new Pods, causing service interruption.
After the above configuration, click Next.