To make the application have higher availability, Container Service supports scheduling containers of the same service in different zones. When a zone malfunctions, the application can still provide services.
You can specify the zone selection in the orchestration file by using the environment variables in the following formats:
The service must be distributed in at least three zones. The container creation fails if less than three zones are in the current cluster, or the service cannot be distributed in three zones because of limited machine resources.
Try to distribute the service in three zones. Container can still be created even if the condition cannot be met.
Note: The deployment constraint only works for newly created containers. It does not work when containers created in the past change the configurations.
In the following example, the service must be distributed in at least two zones.