我运行以下命令:aws ecs describe-clusters
,其输出结果:
{
"clusters": [],
"failures": [
{
"reason": "MISSING",
"arn": "arn:aws:ecs:us-east-2:---------:cluster/default"
}
]
}
但是在https://us-east-2.console.aws.amazon.com/ecs/home?region=us-east-2#/clusters中,我有一个集群。
为什么在aws ecs命令中看不到集群详细信息?
答案 0 :(得分:0)
如果不传递集群的参数,它将返回上面的错误
= 例如
aws ecs describe-clusters --clusters name-of-the-cluster
答案 1 :(得分:0)
您还必须传递群集的名称。
例如
aws ecs describe-clusters --clusters "name-of-your-cluster"
{
"clusters": [
{
"status": "ACTIVE",
"statistics": [],
"tags": [],
"clusterName": "xxxx",
"registeredContainerInstancesCount": 1,
"pendingTasksCount": 0,
"runningTasksCount": 2,
"activeServicesCount": 1,
"clusterArn": "arn:aws:ecs:ap-south-1:xxxxx"
}
],
"failures": []
}
参考:https://docs.aws.amazon.com/cli/latest/reference/ecs/describe-clusters.html