---
title: "获取Pod详情"
method: GET
path: "/k8s/cluster/{id}/namespaces/{namespaceName}/pods/{podName}"
tags: ["Pod管理"]
---

# 获取Pod详情

`GET /k8s/cluster/{id}/namespaces/{namespaceName}/pods/{podName}`

获取指定Pod的详细信息

## Path parameters

- `id` integer, required
- `namespaceName` string, required
- `podName` string, required

## Headers

- `Authorization` string, required

## Response `200`

OK

- object
  - `code` integer — 状态码
  - `data` object — 返回的数据
    - `conditions` ModelPodCondition[] — Pod状态条件
      - `lastTransitionTime` string — 最后转换时间
      - `message` string — 消息
      - `reason` string — 原因
      - `status` string — 状态
      - `type` string — 条件类型
    - `containers` ModelContainerInfo[] — 容器信息
      - `env` ModelEnvVar[] — 环境变量
        - `name` string — 变量名
        - `value` string — 变量值
      - `image` string — 镜像
      - `name` string — 容器名称
      - `ports` ModelContainerPort[] — 端口配置
        - `containerPort` integer — 容器端口
        - `name` string — 端口名称
        - `protocol` string — 协议
      - `ready` boolean — 就绪状态
      - `resources` ModelWorkloadResources
        - `limits` ModelResourceSpec
          - `cpu` string — CPU
          - `memory` string — 内存
        - `requests` ModelResourceSpec
          - `cpu` string — CPU
          - `memory` string — 内存
      - `restartCount` integer — 重启次数
      - `state` string — 状态
    - `createdAt` string — 创建时间
    - `events` ModelK8sEvent[] — 相关事件
      - `count` integer — 发生次数
      - `firstTime` string — 首次时间
      - `lastTime` string — 最后时间
      - `message` string — 消息
      - `reason` string — 原因
      - `source` string — 事件源
      - `type` string — 事件类型
    - `hostIP` string — 主机IP
    - `labels` object — 标签
    - `name` string — 实例名称
    - `nodeName` string — 节点名称
    - `phase` string — 阶段
    - `podIP` string — Pod IP
    - `resources` ModelWorkloadResources
      - `limits` ModelResourceSpec
        - `cpu` string — CPU
        - `memory` string — 内存
      - `requests` ModelResourceSpec
        - `cpu` string — CPU
        - `memory` string — 内存
    - `restartCount` integer — 重启次数
    - `runningTime` string — 运行时间
    - `spec` unknown
    - `status` string — 状态
    - `volumes` ModelVolumeInfo[] — 挂载卷信息
      - `mountPath` string — 挂载路径
      - `name` string — 卷名称
      - `readOnly` boolean — 只读状态
      - `type` string — 卷类型
  - `message` string — 提示信息

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/opsre/apis/devops.md) · [All operations](https://skmtc.net/opsre/apis/devops/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/opsre/devops/revisions/25cac8835c4c/schema)
