---
title: "获取Deployment指定版本详情"
method: GET
path: "/k8s/cluster/{id}/namespaces/{namespaceName}/deployments/{deploymentName}/revisions/{revision}"
tags: ["Deployment版本管理"]
---

# 获取Deployment指定版本详情

`GET /k8s/cluster/{id}/namespaces/{namespaceName}/deployments/{deploymentName}/revisions/{revision}`

获取指定Deployment特定版本的详细配置信息

## Path parameters

- `id` integer, required
- `namespaceName` string, required
- `deploymentName` string, required
- `revision` integer, required

## Headers

- `Authorization` string, required

## Response `200`

OK

- object
  - `code` integer — 状态码
  - `data` object — 返回的数据
    - `annotations` object — 注释
    - `changeReason` string — 变更原因
    - `conditions` ModelWorkloadCondition[] — 状态条件
      - `lastTransitionTime` string — 最后转换时间
      - `message` string — 消息
      - `reason` string — 原因
      - `status` string — 状态
      - `type` string — 条件类型
    - `creationTime` string — 创建时间
    - `events` ModelK8sEvent[] — 相关事件
      - `count` integer — 发生次数
      - `firstTime` string — 首次时间
      - `lastTime` string — 最后时间
      - `message` string — 消息
      - `reason` string — 原因
      - `source` string — 事件源
      - `type` string — 事件类型
    - `images` string[] — 镜像列表
    - `labels` object — 标签
    - `podTemplate` ModelPodTemplateSpec
      - `containers` ModelContainerSpec[], required — 容器规格
        - `args` string[] — 启动参数
        - `command` string[] — 启动命令
        - `env` ModelEnvVar[] — 环境变量
          - `name` string — 变量名
          - `value` string — 变量值
        - `image` string, required — 镜像
        - `name` string, required — 容器名称
        - `ports` ModelContainerPort[] — 端口配置
          - `containerPort` integer — 容器端口
          - `name` string — 端口名称
          - `protocol` string — 协议
        - `resources` ModelWorkloadResources
          - `limits` ModelResourceSpec
            - `cpu` string — CPU
            - `memory` string — 内存
          - `requests` ModelResourceSpec
            - `cpu` string — CPU
            - `memory` string — 内存
        - `volumeMounts` ModelVolumeMount[] — 存储卷挂载
          - `mountPath` string, required — 挂载路径
          - `name` string, required — 卷名称
          - `readOnly` boolean — 只读模式
      - `labels` object — Pod标签
      - `nodeSelector` object — 节点选择器
      - `tolerations` ModelToleration[] — 容忍度
        - `effect` string — 效果
        - `key` string — 键
        - `operator` string — 操作符
        - `value` string — 值
      - `volumes` ModelVolumeSpec[] — 存储卷规格
        - `config` object — 卷配置
        - `name` string, required — 卷名称
        - `type` string, required — 卷类型
    - `replicaSets` ModelReplicaSetInfo[] — 关联的ReplicaSet信息
      - `createdAt` string — 创建时间
      - `name` string — ReplicaSet名称
      - `readyReplicas` integer — 就绪副本数
      - `replicas` integer — 副本数
      - `revision` integer — 版本号
      - `status` string — 状态
    - `replicasSummary` ModelReplicasSummary
      - `available` integer — 可用副本数
      - `current` integer — 当前副本数
      - `desired` integer — 期望副本数
      - `ready` integer — 就绪副本数
      - `updated` integer — 已更新副本数
    - `revision` integer — 版本号
    - `status` string — 版本状态 (current/historical)
    - `strategy` ModelDeploymentStrategy
      - `rollingUpdate` ModelRollingUpdateDeployment
        - `maxSurge` string — 最大激增数量
        - `maxUnavailable` string — 最大不可用数量
      - `type` string — 策略类型
  - `message` string — 提示信息

## Other responses

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

---

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