帮你快速理解、总结文档立即下载

获取集群Pod的YAML内容

最近更新时间:2026-08-04 01:49:57

我的收藏

1. 接口描述

接口请求域名: dlc.tencentcloudapi.com 。

获取集群Pod的YAML内容

默认接口请求频率限制:20次/秒。

推荐使用 API Explorer
点击调试
API Explorer 提供了在线调用、签名验证、SDK 代码生成和快速检索接口等能力。您可查看每次调用的请求内容和返回结果以及自动生成 SDK 调用示例。

2. 输入参数

以下请求参数列表仅列出了接口请求参数和部分公共参数,完整公共参数列表见 公共请求参数

参数名称 必选 类型 描述
Action String 公共参数,本接口取值:GetRayClusterPodYaml。
Version String 公共参数,本接口取值:2021-01-25。
Region String 公共参数,详见产品支持的 地域列表,本接口仅支持其中的: ap-beijing, ap-chongqing, ap-guangzhou, ap-shanghai, ap-singapore 。
Id String

集群ID


示例值:raycluster-20260527110617-96zt
PodName String

Pod名称


示例值:raycluster-20260527110617-96zt-head-6xn6r

3. 输出参数

参数名称 类型 描述
Yaml String

Pod YAML


示例值:---apiVersion: "v1"kind: "Pod"metadata: annotations:
RequestId String 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。

4. 示例

示例1 获取集群Pod的YAML内容

输入示例

POST / HTTP/1.1
Host: dlc.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: GetRayClusterPodYaml
<公共请求参数>

{
    "Id": "raycluster-20260527110617-96zt",
    "PodName": "raycluster-20260527110617-96zt-head-6xn6r"
}

输出示例

{
    "Response": {
        "Yaml": "---\napiVersion: \"v1\"\nkind: \"Pod\"\nmetadata:\n  annotations:\n    kueue.x-k8s.io/workload: \"raycluster-raycluster-20260527110617-96zt-d0d5b\"\n    kueue.x-k8s.io/workload-slice-name: \"raycluster-raycluster-20260527110617-96zt-d0d5b\"\n    prometheus.io/path: \"/metrics\"\n    prometheus.io/port: \"8080\"\n    prometheus.io/scheme: \"http\"\n    prometheus.io/scrape: \"true\"\n    ray.io/ft-enabled: \"false\"\n    ray.io/kuberay-version: \"v1.6.0\"\n    ray.io/upgrade-strategy-recreate-hash: \"5A83EG3C75MNTTS95832UTCH2NM4K190\"\n    tke.cloud.tencent.com/networks-status: |-\n      [{\n          \"name\": \"tke-route-eni\",\n          \"interface\": \"eth0\",\n          \"ips\": [\n              \"30.0.1.153\"\n          ],\n          \"mac\": \"7e:0d:90:75:91:1b\",\n          \"default\": true,\n          \"dns\": {}\n      }]\n  creationTimestamp: \"2026-05-30T03:33:40Z\"\n  generateName: \"raycluster-20260527110617-96zt-head-\"\n  labels:\n    app.kubernetes.io/created-by: \"kuberay-operator\"\n    app.kubernetes.io/name: \"kuberay\"\n    dlc/app-id: \"260200065\"\n    dlc/engine-id: \"raycluster-20260527110617-96zt\"\n    dlc/engine-name: \"raycluster-20260527110617-96zt\"\n    dlc/pay-mode: \"1\"\n    dlc/sub-uin: \"700002655693\"\n    dlc/task-id: \"raycluster-20260527110617-96zt\"\n    dlc/task-type: \"RAY_CLUSTER\"\n    dlc/uin: \"700002655693\"\n    kueue.x-k8s.io/cluster-queue-name: \"dlc-p-bleurqnv-mao-group-cq\"\n    kueue.x-k8s.io/local-queue-name: \"dlc-p-bleurqnv-mao-group-lq\"\n    kueue.x-k8s.io/podset: \"head\"\n    neutrino.io/cluster-uuid: \"raycluster-20260527110617-96zt\"\n    neutrino.io/node-type: \"head\"\n    neutrino.io/ray-log-collector: \"true\"\n    neutrino.io/ray-log-metadata-uuid: \"raycluster-20260527110617-96zt\"\n    pod-role: \"header\"\n    ray.io/cluster: \"raycluster-20260527110617-96zt\"\n    ray.io/group: \"headgroup\"\n    ray.io/identifier: \"raycluster-20260527110617-96zt-head\"\n    ray.io/is-ray-node: \"yes\"\n    ray.io/node-type: \"head\"\n  name: \"raycluster-20260527110617-96zt-head-6xn6r\"\n  namespace: \"dlc-p-bleurqnv\"\n  ownerReferences:\n  - apiVersion: \"ray.io/v1\"\n    kind: \"RayCluster\"\n    blockOwnerDeletion: true\n    controller: true\n    name: \"raycluster-20260527110617-96zt\"\n    uid: \"ad347225-f5fb-4894-be50-3bc8c8ced9bf\"\n  resourceVersion: \"32570167480\"\n  uid: \"4766a7aa-1c5d-4831-b27f-cf9793999f2d\"\nspec:\n  containers:\n  - args:\n    - \"ulimit -n 65536; ray start --head  --block  --dashboard-agent-listen-port=52365\\\n      \\  --dashboard-host=0.0.0.0  --disable-usage-stats  --memory=4294967296  --metrics-export-port=8080\\\n      \\  --num-cpus=0  --object-store-memory=100000000 \"\n    command:\n    - \"/bin/bash\"\n    - \"-c\"\n    - \"--\"\n    env:\n    - name: \"TZ\"\n      value: \"Asia/Shanghai\"\n    - name: \"RAY_CLUSTER_UUID\"\n      value: \"raycluster-20260527110617-96zt\"\n    - name: \"RAY_GRAFANA_HOST\"\n      value: \"http://grafana.monitor.svc.cluster.local:3000\"\n    - name: \"RAY_GRAFANA_IFRAME_HOST\"\n      value: \"https://cls-pdb9lgk2.tcray-gateway.ap-guangzhou.cloud.tencent.com/grafana\"\n    - name: \"RAY_GRAFANA_CLUSTER_FILTER\"\n      valueFrom:\n        fieldRef:\n          apiVersion: \"v1\"\n          fieldPath: \"metadata.labels['ray.io/cluster']\"\n    - name: \"RAY_CLUSTER_NAME\"\n      valueFrom:\n        fieldRef:\n          apiVersion: \"v1\"\n          fieldPath: \"metadata.labels['ray.io/cluster']\"\n    - name: \"RAY_CLUSTER_NAMESPACE\"\n      valueFrom:\n        fieldRef:\n          apiVersion: \"v1\"\n          fieldPath: \"metadata.namespace\"\n    - name: \"RAY_CLOUD_INSTANCE_ID\"\n      valueFrom:\n        fieldRef:\n          apiVersion: \"v1\"\n          fieldPath: \"metadata.name\"\n    - name: \"RAY_NODE_TYPE_NAME\"\n      valueFrom:\n        fieldRef:\n          apiVersion: \"v1\"\n          fieldPath: \"metadata.labels['ray.io/group']\"\n    - name: \"KUBERAY_GEN_RAY_START_CMD\"\n      value: \"ray start --head  --block  --dashboard-agent-listen-port=52365  --dashboard-host=0.0.0.0\\\n        \\  --disable-usage-stats  --memory=4294967296  --metrics-export-port=8080\\\n        \\  --num-cpus=0  --object-store-memory=100000000 \"\n    - name: \"RAY_PORT\"\n      value: \"6379\"\n    - name: \"RAY_ADDRESS\"\n      value: \"127.0.0.1:6379\"\n    - name: \"RAY_USAGE_STATS_KUBERAY_IN_USE\"\n      value: \"1\"\n    - name: \"RAY_USAGE_STATS_EXTRA_TAGS\"\n      value: \"kuberay_version=v1.6.0;kuberay_crd=RayCluster\"\n    - name: \"RAY_DASHBOARD_ENABLE_K8S_DISK_USAGE\"\n      value: \"1\"\n    image: \"ccr.ccs.tencentyun.com/emr-image/tcray:2.55.1-py311-cpu\"\n    imagePullPolicy: \"IfNotPresent\"\n    livenessProbe:\n      failureThreshold: 120\n      httpGet:\n        path: \"/api/healthz\"\n        port: 52365\n        scheme: \"HTTP\"\n      initialDelaySeconds: 30\n      periodSeconds: 5\n      successThreshold: 1\n      timeoutSeconds: 5\n    name: \"ray-head\"\n    ports:\n    - containerPort: 6379\n      name: \"gcs-server\"\n      protocol: \"TCP\"\n    - containerPort: 8265\n      name: \"dashboard\"\n      protocol: \"TCP\"\n    - containerPort: 10001\n      name: \"client\"\n      protocol: \"TCP\"\n    - containerPort: 8080\n      name: \"metrics\"\n      protocol: \"TCP\"\n    readinessProbe:\n      failureThreshold: 10\n      httpGet:\n        path: \"/api/healthz\"\n        port: 52365\n        scheme: \"HTTP\"\n      initialDelaySeconds: 10\n      periodSeconds: 5\n      successThreshold: 1\n      timeoutSeconds: 5\n    resources:\n      limits:\n        cpu: \"1\"\n        memory: \"4Gi\"\n        tke.cloud.tencent.com/eni-ip: \"1\"\n      requests:\n        cpu: \"400m\"\n        memory: \"1638Mi\"\n        tke.cloud.tencent.com/eni-ip: \"1\"\n    securityContext:\n      privileged: true\n    terminationMessagePath: \"/dev/termination-log\"\n    terminationMessagePolicy: \"File\"\n    volumeMounts:\n    - mountPath: \"/mnt/data\"\n      name: \"volume-1\"\n      readOnly: true\n    - mountPath: \"/dev/shm\"\n      name: \"shared-mem\"\n    - mountPath: \"/var/run/secrets/kubernetes.io/serviceaccount\"\n      name: \"kube-api-access-5z274\"\n      readOnly: true\n  dnsPolicy: \"ClusterFirst\"\n  enableServiceLinks: true\n  nodeName: \"30.0.0.31\"\n  nodeSelector:\n    instance_type: \"sv_dlc_standard_cu_standard_cu\"\n  preemptionPolicy: \"PreemptLowerPriority\"\n  priority: 0\n  restartPolicy: \"Always\"\n  schedulerName: \"default-scheduler\"\n  securityContext: {}\n  serviceAccount: \"default\"\n  serviceAccountName: \"default\"\n  terminationGracePeriodSeconds: 30\n  tolerations:\n  - effect: \"NoExecute\"\n    key: \"node.kubernetes.io/not-ready\"\n    operator: \"Exists\"\n    tolerationSeconds: 300\n  - effect: \"NoExecute\"\n    key: \"node.kubernetes.io/unreachable\"\n    operator: \"Exists\"\n    tolerationSeconds: 300\n  volumes:\n  - name: \"volume-1\"\n    persistentVolumeClaim:\n      claimName: \"raycluster-20260527110617-96zt-cos-df101a90c4f8e6ca5bce44d009081a69-pvc\"\n  - emptyDir:\n      medium: \"Memory\"\n      sizeLimit: \"4Gi\"\n    name: \"shared-mem\"\n  - name: \"kube-api-access-5z274\"\n    projected:\n      defaultMode: 420\n      sources:\n      - serviceAccountToken:\n          expirationSeconds: 3607\n          path: \"token\"\n      - configMap:\n          items:\n          - key: \"ca.crt\"\n            path: \"ca.crt\"\n          name: \"kube-root-ca.crt\"\n      - downwardAPI:\n          items:\n          - fieldRef:\n              apiVersion: \"v1\"\n              fieldPath: \"metadata.namespace\"\n            path: \"namespace\"\nstatus:\n  containerStatuses:\n  - containerID: \"containerd://7de8a16763537059f65a167fcfae895e2bccb875fdce0374d5030331697440ac\"\n    image: \"ccr.ccs.tencentyun.com/emr-image/tcray:2.55.1-py311-cpu\"\n    imageID: \"ccr.ccs.tencentyun.com/emr-image/tcray@sha256:d08437e48d567274b6478d31429dd27c7fe72394d99aa6221c1a10658352abbd\"\n    lastState: {}\n    name: \"ray-head\"\n    ready: true\n    restartCount: 0\n    started: true\n    state:\n      running:\n        startedAt: \"2026-05-30T03:33:57Z\"\n  hostIP: \"30.0.0.31\"\n  hostIPs:\n  - ip: \"30.0.0.31\"\n  phase: \"Running\"\n  podIP: \"30.0.1.153\"\n  podIPs:\n  - ip: \"30.0.1.153\"\n  qosClass: \"Burstable\"\n  startTime: \"2026-05-30T03:33:40Z\"\n",
        "RequestId": "4d5ca6d7-2155-42c3-ad08-79125f28f191"
    }
}

5. 开发者资源

腾讯云 API 平台

腾讯云 API 平台 是综合 API 文档、错误码、API Explorer 及 SDK 等资源的统一查询平台,方便您从同一入口查询及使用腾讯云提供的所有 API 服务。

API Inspector

用户可通过 API Inspector 查看控制台每一步操作关联的 API 调用情况,并自动生成各语言版本的 API 代码,也可前往 API Explorer 进行在线调试。

SDK

云 API 3.0 提供了配套的开发工具集(SDK),支持多种编程语言,能更方便的调用 API。

命令行工具

6. 错误码

该接口暂无业务逻辑相关的错误码,其他错误码详见 公共错误码