Alaya NeW Cloud

容器组基本信息

查询训练任务中某个容器组(Pod)的基本运行信息,包含所属集群、命名空间、宿主节点、Pod 状态、重启次数及 QoS 等级等,用于定位单个 Pod 的部署位置与健康状况。Pod 名称可从容器组列表获取。

GEThttps://api.alayanew.com/v1/training/instance/{id}/{podName}/basic

鉴权(Authorizations)

AuthorizationString必填

用户可通过已获取的 Open API Key 做验证。例如:Bearer [YOUR_API_KEY]

Path Parameters

idString必填

训练任务 ID(来自任务列表id)。例如:ca78d6b9-e196-5a0f-b1be-ab036b3cb91a

podNameString必填

容器组名称(来自容器组列表podName)。例如:tn-exqr5k7lvj7k-master-0

Response

statusInteger

业务状态码,200 表示成功。

messageString

接口响应信息。例如:"OK"

dataObject

Pod 基本信息。

显示 properties
clusterNameString

Pod 所在的集群名称。例如:"k8s-01"

hostNameString

Pod 调度到的节点名称(宿主机名)。例如:"gpu-node-021"

namespaceString

Pod 所在的命名空间。例如:"usr-iZBv1HWA"

hostIpString

节点 IP(宿主机 IP)。例如:"10.24.7.1"

statusString

Pod 状态。例如:"Running"

podIpString

Pod IP 地址(集群网络内地址)。例如:"10.24.7.134"

restartCountInteger

Pod 重启次数,数值越大说明该 Pod 越不稳定,可结合任务详情中的执行记录进一步排查。例如:0

qosClassString

QoS(服务质量)类型,反映 Pod 的资源保障等级。常见取值:Guaranteed(资源请求与上限相等,完全保障)、Burstable(部分保障)、BestEffort(无保障,最易被驱逐)。例如:"Guaranteed"

createByString

创建者。例如:"hejiaoshare001"

createTimeString

创建时间。例如:"2025-12-02 06:24:44"

curl -X 'GET' \
  'https://api.alayanew.com/v1/training/instance/ca78d6b9-e196-5a0f-b1be-ab036b3cb91a/tn-exqr5k7lvj7k-master-0/basic' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer [YOUR_API_KEY]'
import requests

task_id = "ca78d6b9-e196-5a0f-b1be-ab036b3cb91a"
pod_name = "tn-exqr5k7lvj7k-master-0"
url = f"https://api.alayanew.com/v1/training/instance/{task_id}/{pod_name}/basic"
headers = {
    "accept": "application/json",
    "Authorization": "Bearer [YOUR_API_KEY]"
}

response = requests.get(url, headers=headers)
print(response.json())
const taskId = 'ca78d6b9-e196-5a0f-b1be-ab036b3cb91a';
const podName = 'tn-exqr5k7lvj7k-master-0';

fetch(`https://api.alayanew.com/v1/training/instance/${taskId}/${podName}/basic`, {
  method: 'GET',
  headers: {
    'accept': 'application/json',
    'Authorization': 'Bearer [YOUR_API_KEY]'
  }
})
  .then(res => res.json())
  .then(console.log)
  .catch(console.error);
{
  "status": 200,
  "message": "OK",
  "data": {
    "clusterName": "k8s-01",
    "hostName": "gpu-node-021",
    "namespace": "usr-iZBv1HWA",
    "hostIp": "10.24.7.1",
    "status": "Running",
    "podIp": "10.24.7.134",
    "restartCount": 0,
    "qosClass": "Guaranteed",
    "createBy": "hejiaoshare001",
    "createTime": "2025-12-02 06:24:44"
  }
}
{
  "status": 403,
  "message": "Forbidden",
  "data": {}
}
{
  "status": 500,
  "message": "Internal Server Error",
  "data": {}
}

Last updated on