[英]AWS ECS Assumed Role using CloudFormation. Where to get assumed role for Docker micro service deployed in ECS?
[英]Where can i see which placementStrategy a service is using in AWS ECS?
我想知道 AWS Elastic Container Services (ECS) 中的一些 mye 服务使用的是哪个placementStrategy?
( https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-placement-strategies.html )
在任务定义中它说:
任务放置约束 无约束
但那是另一回事?
不确定控制台,但在 CLI 中您可以使用describe-services 。 在许多其他事情中,它返回:
placementStrategy -> (list)
The placement strategy that determines how tasks for the service are placed.
(structure)
The task placement strategy for a task or service. For more information, see Task Placement Strategies in the Amazon Elastic Container Service Developer Guide .
type -> (string)
The type of placement strategy. The random placement strategy randomly places tasks on available candidates. The spread placement strategy spreads placement across available candidates evenly based on the field parameter. The binpack strategy places tasks on available candidates that have the least available amount of the resource that is specified with the field parameter. For example, if you binpack on memory, a task is placed on the instance with the least amount of remaining memory (but still enough to run the task).
field -> (string)
The field to apply the placement strategy against. For the spread placement strategy, valid values are instanceId (or host , which has the same effect), or any platform or custom attribute that is applied to a container instance, such as attribute:ecs.availability-zone . For the binpack placement strategy, valid values are cpu and memory . For the random placement strategy, this field is not used.
任务放置策略是在服务中定义的,而不是在任务定义中。 当您创建一个新服务并配置它时,您将获得定义它的选项,请查看官方文档https://docs.aws.amazon.com/AmazonECS/latest/developerguide/basic-service-params.html
在此处附加屏幕截图以显示控制台部分以使用放置策略
要检查之后的部署策略,请检查任务定义:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.