云容器实例 CCI-替换Pod:响应示例

时间:2024-11-06 15:35:51

响应示例

状态码: 200

OK

{
  "apiVersion" : "v1",
  "kind" : "Pod",
  "metadata" : {
    "creationTimestamp" : "2018-09-04T11:04:02Z",
    "labels" : {
      "name" : "pod-test"
    },
    "name" : "pod-test",
    "namespace" : "namespace-test",
    "resourceVersion" : "5253248",
    "selfLink" : "/api/v1/namespaces/namespace-test/pods/pod-test",
    "uid" : "3b99abe8-b032-11e8-9d5d-c88d83be759f"
  },
  "spec" : {
    "containers" : [ {
      "image" : "redis:latest",
      "imagePullPolicy" : "Always",
      "name" : "test",
      "resources" : {
        "limits" : {
          "cpu" : "500m",
          "memory" : "1Gi"
        },
        "requests" : {
          "cpu" : "500m",
          "memory" : "1Gi"
        }
      },
      "terminationMessagePath" : "/dev/termination-log",
      "terminationMessagePolicy" : "File"
    } ],
    "dnsPolicy" : "ClusterFirst",
    "imagePullSecrets" : [ {
      "name" : "imagepull-secret"
    } ],
    "restartPolicy" : "Always",
    "schedulerName" : "default-scheduler",
    "securityContext" : { },
    "tolerations" : [ {
      "effect" : "NoExecute",
      "key" : "node.kubernetes.io/not-ready",
      "operator" : "Exists",
      "tolerationSeconds" : 300
    }, {
      "effect" : "NoExecute",
      "key" : "node.kubernetes.io/unreachable",
      "operator" : "Exists",
      "tolerationSeconds" : 300
    } ]
  },
  "status" : {
    "conditions" : [ {
      "lastProbeTime" : null,
      "lastTransitionTime" : "2018-09-04T11:04:03Z",
      "status" : "True",
      "type" : "Initialized"
    }, {
      "lastProbeTime" : null,
      "lastTransitionTime" : "2018-09-04T11:04:36Z",
      "status" : "True",
      "type" : "Ready"
    }, {
      "lastProbeTime" : null,
      "lastTransitionTime" : "2018-09-04T11:04:02Z",
      "status" : "True",
      "type" : "PodScheduled"
    } ],
    "containerStatuses" : [ {
      "containerID" : "docker://f867ab7d5c68a86fc695e4d3e5f1912fdb8f98f5029ca96032b4d5d407d9a75c",
      "image" : "redis",
      "imageID" : "docker-pullable://redis@sha256:3ab7046bd035a47aa06963d8240651d00b57e82dab07ba374ad01f84dfa1230c",
      "lastState" : { },
      "name" : "test",
      "ready" : true,
      "restartCount" : 0,
      "state" : {
        "running" : {
          "startedAt" : "2018-09-04T11:04:23Z"
        }
      }
    } ],
    "hostIP" : "xxx.xxx.xxx.xxx",
    "phase" : "Running",
    "podIP" : "192.168.244.170",
    "qosClass" : "Guaranteed",
    "startTime" : "2018-09-04T11:04:03Z"
  }
}
support.huaweicloud.com/api-cci/replaceCoreV1NamespacedPod.html