调用DescribeContainerGroups批量查询ECI实例的信息。
接口说明
当 ECI 实例运行终止后,底层计算资源将会被回收。随实例一起创建的其它资源(例如 EIP 等)默认随实例一起释放。
- 终态(处于 Failed、Succeeded 或 Expired 状态)实例的元数据信息的保留情况如下:
1 小时内的实例信息全部保留。
超出 1 小时的实例仅保留最近的 100 条(单个地域分别计算)。
如果使用 RAM 用户账号或者 RAM 角色进行查询,当 RAM 用户或者角色缺乏接口权限时,会返回空列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
eci:DescribeContainerGroups |
get |
ContainerGroup
ContainerGroup
|
|
无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
实例所属的地域 ID。 |
cn-hangzhou |
| RegionId |
string |
是 |
实例所属的地域 ID。 |
cn-hangzhou |
| ZoneId |
string |
否 |
实例所属的可用区。如果取值为空,则表示由系统选择。 默认值为空。 |
cn-hangzhou-h |
| VSwitchId |
string |
否 |
实例所属的虚拟交换机 ID。 |
vsw-bp1jrgfqqy54kg5hc**** |
| NextToken |
string |
否 |
下一个查询开始的 Token,NextToken 为空表示没有下一个。 说明
首次查询时无需设置该参数,后续查询的 Token 从返回结果中获取。 |
d78f2dd8-5979-42fe-****-b16db43be5bc |
| Limit |
integer |
否 |
限定此次返回资源的数量。如果不设置,默认返回 20 个,最大不能超过 20 个。 说明
返回结果可能小于指定的数量,但不会多于指定的数量。 |
20 |
| ContainerGroupIds |
string |
否 |
实例 ID 序列。最多 20 个,字符串需按照 JSON 格式传入。 |
["eci-bp17gw49eu09yiwm****", "eci-bp19aq49du01abcm****", "eci-2zegym1qhbmdfr1s****"] |
| ContainerGroupName |
string |
否 |
实例名称,即容器组名称。 |
test |
| Status |
string |
否 |
实例状态。取值范围:
|
Running |
| ResourceGroupId |
string |
否 |
实例所属的资源组 ID。 |
rg-aekzh43v***** |
| WithEvent |
boolean |
否 |
是否返回事件信息。 |
true |
| Tag |
array<object> |
否 |
实例标签信息。 |
|
|
object |
否 |
实例标签信息。 |
||
| Key |
string |
否 |
实例标签键。 |
name |
| Value |
string |
否 |
实例标签值。 |
test |
| ComputeCategory |
string |
否 |
指定算力类别。取值范围:
|
economy |
| SecurityGroupId |
string |
否 |
实例所属的安全组 ID。 |
sg-uf66jeqopgqa9hdn**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| TotalCount |
integer |
实例数量。 |
1 |
| NextToken |
string |
下一个查询开始的 Token。 |
d78f2dd8-5979-42fe-****-b16db43be5bc |
| RequestId |
string |
请求 ID,唯一标识。 |
89945DD3-9072-47D0-A318-353284CFC7B3 |
| ContainerGroups |
array<object> |
实例信息列表。 |
|
|
array<object> |
实例信息列表。 |
||
| Status |
string |
实例状态。可能值:
|
Running |
| CreationTime |
string |
接到请求后的系统创建时间。UTC 时间,RFC3339 标准。 |
2018-08-02T15:00:00Z |
| VpcId |
string |
实例所属的 VPC ID。 |
vpc-1vzjjflab6wvjox**** |
| InternetIp |
string |
公网 IP。 |
192.0.XX.XX |
| TenantSecurityGroupId |
string |
该参数未开放使用。 |
sg-xxx |
| SecurityGroupId |
string |
安全组 ID。 |
sg-bp12ujq5zpxuyjfo3o8r |
| HostAliases |
array<object> |
自定义实例内一个容器的 Hostname 映射。 |
|
|
object |
自定义实例内一个容器的 Hostname 映射。 |
||
| Hostnames |
array |
主机信息。 |
|
|
string |
主机名。 |
['hehe.com', 'haha.com'] |
|
| Ip |
string |
IP 地址。 |
192.0.XX.XX |
| Tags |
array<object> |
实例标签信息。 |
|
|
object |
实例标签信息。 |
||
| Key |
string |
标签键。 |
name |
| Value |
string |
标签值。 |
test-xh |
| Events |
array<object> |
事件信息,上限 50。 |
|
|
object |
事件信息,上限 50。 |
||
| Type |
string |
事件类型,可能值:
|
Normal |
| LastTimestamp |
string |
事件结束时间。 |
2018-08-02T15:00:00Z |
| Message |
string |
事件消息。 |
Started container |
| Name |
string |
事件的归属对象名。 |
test-xxx |
| Reason |
string |
事件名。 |
Created |
| Count |
integer |
事件数量。 |
20 |
| FirstTimestamp |
string |
事件起始时间。 |
2018-08-02T15:00:00Z |
| SucceededTime |
string |
容器全部成功退出后的时间。UTC 时间,RFC3339 标准。 |
2019-12-11T04:33:42Z |
| SpotStrategy |
string |
实例的抢占策略。取值范围:
|
NoSpot |
| SpotPriceLimit |
number |
抢占式实例的每小时最高价格。 仅当 SpotStrategy 为 SpotWithPriceLimit 时返回。 |
0.025 |
| EphemeralStorage |
integer |
临时存储空间大小。单位为:GiB。 |
20 |
| TenantEniInstanceId |
string |
该参数未开放使用。 |
i-xxx |
| Discount |
integer |
折扣。 |
9 |
| RestartPolicy |
string |
容器组的重启策略。取值范围:
|
Never |
| Memory |
number |
实例级别内存大小。单位为 GiB。 |
4.0 |
| TenantVSwitchId |
string |
该参数未开放使用。 |
vsw-xxx |
| Containers |
array<object> |
实例包含的容器列表。 |
|
|
array<object> |
实例包含的容器列表。 |
||
| LivenessProbe |
object |
存活探针。 |
|
| SuccessThreshold |
integer |
从上次检查失败后重新认定检查成功的检查次数阈值(必须是连续成功),默认为 1。当前必须为 1。 |
1 |
| InitialDelaySeconds |
integer |
检查开始执行的时间,以容器启动完成为起点计算。 |
10 |
| FailureThreshold |
integer |
从上次检查成功后认定检查失败的检查次数阈值(必须是连续失败),默认为 3。 |
3 |
| TimeoutSeconds |
integer |
检查超时的时间,默认为 1 秒,最小为 1 秒。 |
10 |
| TcpSocket |
object |
TcpSocket。 |
|
| Host |
string |
主机名。 |
1.2.3.4 |
| Port |
integer |
端口号。 |
80 |
| Execs |
array |
执行命令。 |
|
|
string |
执行命令。 |
["/bin/sh", "-c", "echo Hello world > /usr/share/message"] |
|
| HttpGet |
object |
HttpGet。 |
|
| Scheme |
string |
HTTP 或 HTTPS。 |
HTTP |
| Path |
string |
HttpGet 检测的路径。 |
/usr/nginx/ |
| Port |
integer |
HttpGet 检测的端口。 |
80 |
| PeriodSeconds |
integer |
检查执行的周期,默认为 10 秒,最小为 1 秒。 |
5 |
| Commands |
array |
容器启动命令。 |
|
|
string |
容器启动命令。 |
[/bin/sh echo] |
|
| VolumeMounts |
array<object> |
挂载的数据卷信息。 |
|
|
object |
挂载的数据卷信息。 |
||
| MountPropagation |
string |
数据卷的挂载传播设置。挂载传播允许将 Container 挂载的卷共享到同一 Pod 中的其他 Container,甚至可以共享到同一节点上的其他 Pod。可能值:
|
None |
| MountPath |
string |
挂载目录,容器的挂载目录下的内容被 Volume 的内容直接覆盖。 |
/usr/share/ |
| ReadOnly |
boolean |
是否只读。 |
false |
| Name |
string |
数据卷名称。 |
test-empty |
| SubPath |
string |
数据卷下的子目录。方便实例将同一个数据卷下的不同目录挂载到容器的不同目录。 |
/usr/sub |
| Args |
array |
容器启动参数。 |
|
|
string |
容器启动参数。 |
["hello"] |
|
| Image |
string |
容器镜像。 |
mysql |
| Ports |
array<object> |
暴露端口和协议。 |
|
|
object |
暴露端口和协议。 |
||
| Protocol |
string |
协议类型。 |
TCP |
| Port |
integer |
端口号。可能值:1~65535。 |
8080 |
| RestartCount |
integer |
重启次数。 |
0 |
| ImagePullPolicy |
string |
镜像拉取策略。可能值:
|
Always |
| StdinOnce |
boolean |
当标准输入为 true 时,标准输入流将在多个附加会话中保持开启状态。如果 StdinOnce 设为 true,标准输入在容器开启时被打开,在首个客户端附加到标准输入之前都为空,然后会一直保持开启状态,接收数据,直到客户端连接断开,此时标准输入被关闭,在容器重启前一直保持关闭状态。 |
true |
| Cpu |
number |
容器的 vCPU 大小。 |
2.0 |
| PreviousState |
object |
上一次状态。 |
|
| StartTime |
string |
容器运行开始时间。 |
2021-12-02T15:00:00Z |
| FinishTime |
string |
容器运行结束时间。 |
2021-12-02T15:01:00Z |
| DetailStatus |
string |
状态详情。 |
working |
| State |
string |
容器状态。可能值:
|
Terminated |
| Message |
string |
容器状态信息。 |
Back-off 5m0s restarting failed container=test pod=test_eci-xxx(xxx) |
| Signal |
integer |
容器状态信号。 |
1 |
| ExitCode |
integer |
容器运行退出码。 |
0 |
| Reason |
string |
容器状态 Reason。 |
Completed |
| Tty |
boolean |
是否开启交互。默认为 false。例如:当 Command 配置为 |
false |
| WorkingDir |
string |
工作目录。 |
/usr/local/nginx |
| CurrentState |
object |
容器当前状态。 |
|
| StartTime |
string |
容器运行开始时间。 |
2021-12-02T15:00:00Z |
| FinishTime |
string |
容器运行结束时间。 |
2021-12-02T15:01:00Z |
| DetailStatus |
string |
容器状态详情。 |
working |
| State |
string |
容器状态,可能值:
|
Terminated |
| Message |
string |
容器状态信息。 |
Back-off 5m0s restarting failed container=test pod=test_eci-xxx(xxx) |
| Signal |
integer |
容器状态信号。 |
1 |
| ExitCode |
integer |
容器运行退出码。 |
0 |
| Reason |
string |
容器状态 Reason。 |
Started |
| Ready |
boolean |
指定容器是否已通过其就绪探针。 |
true |
| Gpu |
integer |
GPU 个数。 |
1 |
| SecurityContext |
object |
实例运行的安全上下文。 |
|
| ReadOnlyRootFilesystem |
boolean |
是否只读根文件系统,目前仅支持 True。 |
true |
| RunAsUser |
integer |
运行容器的用户 ID。 |
1000 |
| Capability |
object |
容器内的进程所具备的特定权限。 |
|
| Adds |
array |
容器内的进程所具备的特定权限。 |
|
|
string |
容器内的进程所具备的特定权限。 |
[NET_ADMIN] |
|
| Memory |
number |
容器内存大小。单位为 GiB。 |
2.0 |
| Stdin |
boolean |
此容器是否应在容器运行时为标准输入分配缓冲区。如果未设置,则容器中标准输入的读取值将导致 EOF。默认为 false。 |
true |
| Name |
string |
容器名称。 |
nginx |
| EnvironmentVars |
array<object> |
环境变量。 |
|
|
array<object> |
环境变量。 |
||
| Key |
string |
环境变量名。 |
PATH |
| Value |
string |
环境变量值。 |
/usr/bin/ |
| ValueFrom |
object |
环境变量值的来源。 如果值不为空,则无法使用。 |
|
| FieldRef |
object |
指定字段。 |
|
| FieldPath |
string |
字段的路径。 |
status.podIP |
| ReadinessProbe |
object |
应用业务探针(即就绪探针),用于检查容器是否已经就绪,可以为请求提供服务。 |
|
| SuccessThreshold |
integer |
从上次检查失败后重新认定检查成功的检查次数阈值(必须是连续成功),默认为 1。当前必须为 1。 |
1 |
| InitialDelaySeconds |
integer |
检查开始执行的时间,以容器启动完成为起点计算。 |
5 |
| FailureThreshold |
integer |
从上次检查成功后认定检查失败的检查次数阈值(必须是连续失败),默认为 3。 |
3 |
| TimeoutSeconds |
integer |
检查超时的时间,默认为 1 秒,最小为 1 秒。 |
1 |
| TcpSocket |
object |
使用 TCP Socket 方式进行健康检查。 |
|
| Host |
string |
Host。 |
1.2.3.4 |
| Port |
integer |
端口号。 |
8888 |
| Execs |
array |
使用命令行方式进行健康检查时,在容器内执行的命令。 |
|
|
string |
使用命令行方式进行健康检查时,在容器内执行的命令。 |
["/bin/sh", "-c", "echo Hello world > /usr/share/message"] |
|
| HttpGet |
object |
使用 HTTP 请求方式进行健康检查。 |
|
| Scheme |
string |
HTTP/HTTPS。 |
HTTP |
| Path |
string |
HttpGet 检测的路径。 |
/usr/local |
| Port |
integer |
HttpGet 检测的端口号。 |
8080 |
| PeriodSeconds |
integer |
检查执行的周期,默认为 10 秒,最小为 1 秒。 |
1 |
| EniInstanceId |
string |
弹性网卡 ID。 |
eni-bp14rzqi6fd8satm**** |
| InitContainers |
array<object> |
Init 容器列表。 |
|
|
array<object> |
Init 容器列表。 |
||
| VolumeMounts |
array<object> |
Init 容器挂载的数据卷信息。 |
|
|
object |
Init 容器挂载的数据卷信息。 |
||
| MountPropagation |
string |
数据卷的挂载传播设置。挂载传播允许将 Container 挂载的卷共享到同一 Pod 中的其他 Container,甚至可以共享到同一节点上的其他 Pod。可能值:
|
None |
| MountPath |
string |
挂载目录,容器的挂载目录下的内容被 Volume 的内容直接覆盖。 |
/usr/share/ |
| ReadOnly |
boolean |
是否只读。 |
false |
| Name |
string |
数据卷名称,同 Volume 中的 Name。 |
test-empty |
| Args |
array |
启动参数。 |
|
|
string |
启动参数。 |
['hello world'] |
|
| Image |
string |
镜像。 |
nginx |
| Ports |
array<object> |
暴露端口和协议。 |
|
|
object |
暴露端口和协议。 |
||
| Protocol |
string |
协议类型。 |
TCP |
| Port |
integer |
端口号。可能值:1~65535。 |
8888 |
| RestartCount |
integer |
重启次数。 |
5 |
| ImagePullPolicy |
string |
镜像拉取策略。可能值:
|
Always |
| PreviousState |
object |
上一次状态。 |
|
| StartTime |
string |
容器运行开始时间。 |
2021-12-02T15:00:00Z |
| FinishTime |
string |
容器运行结束时间。 |
2021-12-02T15:01:00Z |
| DetailStatus |
string |
状态详情。 |
working |
| State |
string |
容器状态,枚举值:Waiting,Running,Terminated。 |
Terminated |
| Message |
string |
容器状态信息。 |
Started container |
| Signal |
integer |
容器状态信号。 |
1 |
| ExitCode |
integer |
容器运行退出码。 |
0 |
| Reason |
string |
容器状态 Reason。 |
completed |
| WorkingDir |
string |
工作目录。 |
/usr/test |
| Cpu |
number |
vCPU 大小。 |
1.0 |
| CurrentState |
object |
当前状态。 |
|
| StartTime |
string |
容器运行开始时间。 |
2021-12-02T15:00:00Z |
| FinishTime |
string |
容器运行结束时间。 |
2021-12-02T15:01:00Z |
| DetailStatus |
string |
状态详情。 |
working |
| State |
string |
容器状态,可能值:
|
Running |
| Message |
string |
事件消息。 |
Created container |
| Signal |
integer |
容器状态信号。 |
1 |
| ExitCode |
integer |
容器退出码。 |
0 |
| Reason |
string |
容器状态 Reason。 |
Started |
| Command |
array |
启动命令。 |
|
|
string |
启动命令。 |
[/bin/sh echo] |
|
| Ready |
boolean |
指定容器是否已通过其就绪探针。 |
true |
| Gpu |
integer |
GPU 个数。 |
1 |
| SecurityContext |
object |
容器运行的安全上下文。 |
|
| ReadOnlyRootFilesystem |
boolean |
是否只读根文件系统,目前仅支持 True。 |
true |
| RunAsUser |
integer |
用于运行容器进程入口点的 UID。 |
1557 |
| Capability |
object |
容器内的进程所具备的特定权限。 |
|
| Adds |
array |
容器内的进程所具备的特定权限。 |
|
|
string |
容器内的进程所具备的特定权限。 |
NET_ADMIN |
|
| Memory |
number |
Init 容器内存大小。单位为 GiB。 |
2.0 |
| Name |
string |
容器名称。 |
Init-xxx |
| EnvironmentVars |
array<object> |
环境变量。 |
|
|
array<object> |
环境变量。 |
||
| Key |
string |
环境变量名。 |
PATH |
| Value |
string |
环境变量值。 |
/usr/local/bin |
| ValueFrom |
object |
环境变量值的来源。 如果值不为空,则无法使用。 |
|
| FieldRef |
object |
指定的字段。 |
|
| FieldPath |
string |
指定的版本中选择字段的路径。目前只支持 |
status.podIP |
| ContainerGroupId |
string |
实例 ID。 |
eci-bp1jrgfqqy54kg5hc**** |
| TenantEniIp |
string |
该参数未开放使用。 |
10.10.XX.XX |
| InstanceType |
string |
指定的 ECS 实例规格。 |
ecs.g5.large |
| IntranetIp |
string |
内网 IP。 |
172.16.XX.XX |
| Ipv6Address |
string |
IPv6 地址。 |
2001:XXXX:4:4:4:4:4:4 |
| RegionId |
string |
实例所属的地域 ID。 |
cn-hangzhou |
| DnsConfig |
object |
DNS 配置信息。 |
|
| Searches |
array |
DNS 搜索域列表。 |
|
|
string |
DNS 搜索域。 |
svc.local.kubenetes |
|
| Options |
array<object> |
对象选项列表,每个对象由 Name 和 Value(可选)构成。 |
|
|
object |
对象选项列表,每个对象由 Name 和 Value(可选)构成。 |
||
| Value |
string |
对象变量值。 |
value |
| Name |
string |
对象变量名。 |
name |
| NameServers |
array |
DNS 服务器 IP 地址列表。 |
|
|
string |
IP 地址。 |
[10.2.*.*] |
|
| Volumes |
array<object> |
数据卷信息。 |
|
|
array<object> |
数据卷信息。 |
||
| Type |
string |
数据卷类型,可能值:
|
EmptyDirVolume |
| DiskVolumeDiskId |
string |
DiskVolume 的 ID。 |
d-xxxx |
| NFSVolumeReadOnly |
boolean |
是否只读。 |
false |
| ConfigFileVolumeConfigFileToPaths |
array<object> |
配置文件路径列表。 |
|
|
object |
配置文件路径列表。 |
||
| Path |
string |
相对文件路径。 |
/usr/bin/ |
| Content |
string |
配置文件内容 (32KB)。 |
hello world |
| FlexVolumeFsType |
string |
挂载的文件系统类型,默认取决于 FlexVolume 的 script。 |
ntfs |
| FlexVolumeDriver |
string |
用于 FlexVolume 的驱动程序名称。 |
flexvolume |
| DiskVolumeFsType |
string |
数据卷类型。 |
xfs |
| FlexVolumeOptions |
string |
FlexVolume 对象选项列表。 |
[nolock,tcp,noresvport] |
| NFSVolumeServer |
string |
NFS 服务器地址。 |
0eafxxxxx-xxxxx.cn-hangzhou.nas.aliyuncs.com |
| NFSVolumePath |
string |
NFS 数据卷路径。 |
/eci |
| Name |
string |
数据卷名称。 |
test-empty |
| EmptyDirVolumeMedium |
string |
EmptyDir 数据卷的存储媒介。默认为空,表示使用 node 文件系统。支持配置为以下值:
|
Memory |
| EmptyDirVolumeSizeLimit |
string |
EmptyDir 数据卷的大小。 |
256Mi |
| RamRoleName |
string |
实例 RAM 角色名称,ECI 与 ECS 共用实例 RAM 角色,具体操作,请参见通过 API 使用实例 RAM 角色。 |
ram:PassRole |
| VSwitchId |
string |
虚拟交换机 ID。 |
vsw-bp1vzjjflab6wvjox**** |
| Cpu |
number |
实例级别 vCPU 大小。 |
2.0 |
| ExpiredTime |
string |
由于账户欠费导致实例运行失败的时间。UTC 时间,RFC3339 标准。 |
2018-08-02T15:00:00Z |
| ResourceGroupId |
string |
资源组 ID。 |
rg-8db03793gfrz**** |
| ZoneId |
string |
实例所属的可用区。 |
cn-hangzhou-h |
| ContainerGroupName |
string |
实例名称。 |
test |
| EciSecurityContext |
object |
容器组运行的安全上下文。 |
|
| Sysctls |
array<object> |
sysctl 参数。 |
|
|
object |
sysctl 参数。 |
||
| Value |
string |
sysctl 参数值。 |
65536 |
| Name |
string |
sysctl 参数名。 |
kernel.msgmax |
| FailedTime |
string |
实例运行失败的时间。UTC 时间,RFC 3339 标准。 |
2018-08-02T15:00:00Z |
| ComputeCategory |
string |
算力类别。可能值:
|
economy |
| DnsPolicy |
string |
DNS 策略。可能值
|
None |
示例
正常返回示例
JSON格式
{
"TotalCount": 1,
"NextToken": "d78f2dd8-5979-42fe-****-b16db43be5bc",
"RequestId": "89945DD3-9072-47D0-A318-353284CFC7B3",
"ContainerGroups": [
{
"Status": "Running",
"CreationTime": "2018-08-02T15:00:00Z",
"VpcId": "vpc-1vzjjflab6wvjox****",
"InternetIp": "192.0.XX.XX",
"TenantSecurityGroupId": "sg-xxx",
"SecurityGroupId": "sg-bp12ujq5zpxuyjfo3o8r",
"HostAliases": [
{
"Hostnames": [
"['hehe.com', 'haha.com']"
],
"Ip": "192.0.XX.XX"
}
],
"Tags": [
{
"Key": "name",
"Value": "test-xh"
}
],
"Events": [
{
"Type": "Normal",
"LastTimestamp": "2018-08-02T15:00:00Z",
"Message": "Started container",
"Name": "test-xxx",
"Reason": "Created",
"Count": 20,
"FirstTimestamp": "2018-08-02T15:00:00Z"
}
],
"SucceededTime": "2019-12-11T04:33:42Z",
"SpotStrategy": "NoSpot",
"SpotPriceLimit": 0.025,
"EphemeralStorage": 20,
"TenantEniInstanceId": "i-xxx",
"Discount": 9,
"RestartPolicy": "Never",
"Memory": 4,
"TenantVSwitchId": "vsw-xxx",
"Containers": [
{
"LivenessProbe": {
"SuccessThreshold": 1,
"InitialDelaySeconds": 10,
"FailureThreshold": 3,
"TimeoutSeconds": 10,
"TcpSocket": {
"Host": "1.2.3.4",
"Port": 80
},
"Execs": [
"[\"/bin/sh\", \"-c\", \"echo Hello world > /usr/share/message\"]"
],
"HttpGet": {
"Scheme": "HTTP",
"Path": "/usr/nginx/",
"Port": 80
},
"PeriodSeconds": 5
},
"Commands": [
"[/bin/sh echo]"
],
"VolumeMounts": [
{
"MountPropagation": "None",
"MountPath": "/usr/share/",
"ReadOnly": false,
"Name": "test-empty",
"SubPath": "/usr/sub"
}
],
"Args": [
"[\"hello\"]"
],
"Image": "mysql",
"Ports": [
{
"Protocol": "TCP",
"Port": 8080
}
],
"RestartCount": 0,
"ImagePullPolicy": "Always",
"StdinOnce": true,
"Cpu": 2,
"PreviousState": {
"StartTime": "2021-12-02T15:00:00Z",
"FinishTime": "2021-12-02T15:01:00Z",
"DetailStatus": "working",
"State": "Terminated",
"Message": "Back-off 5m0s restarting failed container=test pod=test_eci-xxx(xxx)",
"Signal": 1,
"ExitCode": 0,
"Reason": "Completed"
},
"Tty": false,
"WorkingDir": "/usr/local/nginx",
"CurrentState": {
"StartTime": "2021-12-02T15:00:00Z",
"FinishTime": "2021-12-02T15:01:00Z",
"DetailStatus": "working",
"State": "Terminated",
"Message": "Back-off 5m0s restarting failed container=test pod=test_eci-xxx(xxx)",
"Signal": 1,
"ExitCode": 0,
"Reason": "Started"
},
"Ready": true,
"Gpu": 1,
"SecurityContext": {
"ReadOnlyRootFilesystem": true,
"RunAsUser": 1000,
"Capability": {
"Adds": [
"[NET_ADMIN]"
]
}
},
"Memory": 2,
"Stdin": true,
"Name": "nginx",
"EnvironmentVars": [
{
"Key": "PATH",
"Value": "/usr/bin/",
"ValueFrom": {
"FieldRef": {
"FieldPath": "status.podIP"
}
}
}
],
"ReadinessProbe": {
"SuccessThreshold": 1,
"InitialDelaySeconds": 5,
"FailureThreshold": 3,
"TimeoutSeconds": 1,
"TcpSocket": {
"Host": "1.2.3.4",
"Port": 8888
},
"Execs": [
"[\"/bin/sh\", \"-c\", \"echo Hello world > /usr/share/message\"]"
],
"HttpGet": {
"Scheme": "HTTP",
"Path": "/usr/local",
"Port": 8080
},
"PeriodSeconds": 1
}
}
],
"EniInstanceId": "eni-bp14rzqi6fd8satm****",
"InitContainers": [
{
"VolumeMounts": [
{
"MountPropagation": "None",
"MountPath": "/usr/share/",
"ReadOnly": false,
"Name": "test-empty"
}
],
"Args": [
"['hello world']"
],
"Image": "nginx",
"Ports": [
{
"Protocol": "TCP",
"Port": 8888
}
],
"RestartCount": 5,
"ImagePullPolicy": "Always",
"PreviousState": {
"StartTime": "2021-12-02T15:00:00Z",
"FinishTime": "2021-12-02T15:01:00Z",
"DetailStatus": "working",
"State": "Terminated",
"Message": "Started container",
"Signal": 1,
"ExitCode": 0,
"Reason": "completed"
},
"WorkingDir": "/usr/test",
"Cpu": 1,
"CurrentState": {
"StartTime": "2021-12-02T15:00:00Z",
"FinishTime": "2021-12-02T15:01:00Z",
"DetailStatus": "working",
"State": "Running",
"Message": "Created container",
"Signal": 1,
"ExitCode": 0,
"Reason": "Started"
},
"Command": [
"[/bin/sh echo]"
],
"Ready": true,
"Gpu": 1,
"SecurityContext": {
"ReadOnlyRootFilesystem": true,
"RunAsUser": 1557,
"Capability": {
"Adds": [
"NET_ADMIN"
]
}
},
"Memory": 2,
"Name": "Init-xxx",
"EnvironmentVars": [
{
"Key": "PATH",
"Value": "/usr/local/bin",
"ValueFrom": {
"FieldRef": {
"FieldPath": "status.podIP"
}
}
}
]
}
],
"ContainerGroupId": "eci-bp1jrgfqqy54kg5hc****",
"TenantEniIp": "10.10.XX.XX",
"InstanceType": "ecs.g5.large",
"IntranetIp": "172.16.XX.XX",
"Ipv6Address": "2001:XXXX:4:4:4:4:4:4",
"RegionId": "cn-hangzhou",
"DnsConfig": {
"Searches": [
"svc.local.kubenetes"
],
"Options": [
{
"Value": "value",
"Name": "name"
}
],
"NameServers": [
"[10.2.*.*]"
]
},
"Volumes": [
{
"Type": "EmptyDirVolume",
"DiskVolumeDiskId": "d-xxxx",
"NFSVolumeReadOnly": false,
"ConfigFileVolumeConfigFileToPaths": [
{
"Path": "/usr/bin/",
"Content": "hello world"
}
],
"FlexVolumeFsType": "ntfs",
"FlexVolumeDriver": "flexvolume",
"DiskVolumeFsType": "xfs",
"FlexVolumeOptions": "[nolock,tcp,noresvport]",
"NFSVolumeServer": "0eafxxxxx-xxxxx.cn-hangzhou.nas.aliyuncs.com",
"NFSVolumePath": "/eci",
"Name": "test-empty",
"EmptyDirVolumeMedium": "Memory",
"EmptyDirVolumeSizeLimit": "256Mi"
}
],
"RamRoleName": "ram:PassRole",
"VSwitchId": "vsw-bp1vzjjflab6wvjox****",
"Cpu": 2,
"ExpiredTime": "2018-08-02T15:00:00Z",
"ResourceGroupId": "rg-8db03793gfrz****",
"ZoneId": "cn-hangzhou-h",
"ContainerGroupName": "test",
"EciSecurityContext": {
"Sysctls": [
{
"Value": "65536",
"Name": "kernel.msgmax"
}
]
},
"FailedTime": "2018-08-02T15:00:00Z",
"ComputeCategory": "economy",
"DnsPolicy": "None"
}
]
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter.MismatchInstanceType | The instanceId mismatch instance type. | 实例类型错误 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。