尝试使用ecs-cli并获得引用集群是无效的吗?
我看不到我在哪里指定集群?
<iframe width="420" height="315"
src="https://www.youtube.com/embed/tgbNymZ7vqY?autoplay=1">
</iframe>
docker-compose:
aws ecs create-cluster --region us-west-2 --cluster burrfg
{
"cluster": {
"status": "ACTIVE",
"clusterName": "burrfg",
"registeredContainerInstancesCount": 0,
"pendingTasksCount": 0,
"runningTasksCount": 0,
"activeServicesCount": 0,
"clusterArn": "arn:aws:ecs:us-west-2:5533219:cluster/burrfg"
}
}
ecs-cli compose --file docker-compose.yml service up
WARN[0000] Skipping unsupported YAML option for service... option name=expose service name=burrfg
INFO[0001] Using ECS task definition TaskDefinition="ubuntudock:3"
ERRO[0001] Error creating service error="ClusterNotFoundException: The referenced cluster was inactive.\n\tstatus code: 400, request id: 28eab6b7-7eb2-11e9-be1a-633df2a55bcb" service=ubuntudock
INFO[0001] Created an ECS service service=ubuntudock taskDefinition="ubuntudock:3"
答案 0 :(得分:0)
您似乎没有指定要在其上创建服务的集群,请尝试使用ecs-cli configure
为ex's-cli设置默认集群,或使用ecs-cli compose --cluster-config burrfg file docker-compose.yml —service up
传递集群配置
此外,为什么要使用AWS cli而不是ecs-cli up
创建集群?
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cmd-ecs-cli-configure.html