云容器实例 CCI-查询用户所有的Pods:响应示例

时间:2025-02-12 14:55:31

响应示例

状态码: 200

OK

{  "apiVersion" : "v1",  "items" : [ {    "metadata" : {      "annotations" : {        "kubernetes.io/created-by" : "{\"kind\":\"SerializedReference\",\"apiVersion\":\"v1\",\"reference\":{\"kind\":\"ReplicationController\",\"namespace\":\"default\",\"name\":\"fdsfsd\",\"uid\":\"7539c329-57c4-11e7-afb7-fa163e218692\",\"apiVersion\":\"v1\",\"resourceVersion\":\"956153\"}}",        "kubernetes.io/limit-ranger" : "LimitRanger plugin set: cpu request for container container01"      },      "creationTimestamp" : "2017-06-23T03:31:35Z",      "generateName" : "fdsfsd-",      "labels" : {        "cce/appgroup" : "gfsad",        "name" : "fdsfsd"      },      "name" : "fdsfsd-ddnft",      "namespace" : "default",      "ownerReferences" : [ {        "apiVersion" : "v1",        "controller" : true,        "kind" : "ReplicationController",        "name" : "fdsfsd",        "uid" : "7539c329-57c4-11e7-afb7-fa163e218692"      } ],      "resourceVersion" : "1449034",      "selfLink" : "/api/v1/namespaces/default/pods/fdsfsd-ddnft",      "uid" : "753a45bc-57c4-11e7-afb7-fa163e218692"    },    "spec" : {      "containers" : [ {        "image" : "10.154.52.159:443/test/apache-php:latest",        "imagePullPolicy" : "Always",        "name" : "container01",        "ports" : [ {          "containerPort" : 80,          "protocol" : "TCP"        } ],        "resources" : {          "requests" : {            "cpu" : "100m"          }        },        "terminationMessagePath" : "/dev/termination-log",        "volumeMounts" : [ {          "mountPath" : "/var/run/secrets/kubernetes.io/serviceaccount",          "name" : "default-token-863rh",          "readOnly" : true        } ]      } ],      "dnsPolicy" : "ClusterFirst",      "imagePullSecrets" : [ {        "name" : "myregistry"      } ],      "nodeName" : "192.168.12.187",      "restartPolicy" : "Always",      "securityContext" : { },      "serviceAccount" : "default",      "serviceAccountName" : "default",      "volumes" : [ {        "name" : "default-token-863rh",        "secret" : {          "defaultMode" : 420,          "secretName" : "default-token-863rh"        }      } ]    },    "status" : {      "conditions" : [ {        "lastProbeTime" : null,        "lastTransitionTime" : "2017-06-23T03:31:36Z",        "status" : "True",        "type" : "Initialized"      }, {        "lastProbeTime" : null,        "lastTransitionTime" : "2017-06-28T06:34:51Z",        "status" : "True",        "type" : "Ready"      }, {        "lastProbeTime" : null,        "lastTransitionTime" : "2017-06-23T03:31:35Z",        "status" : "True",        "type" : "PodScheduled"      } ],      "containerStatuses" : [ {        "containerID" : "docker://f3daa802f753d123fe66b2cba2e917725702f8d446c17541822a68f9d2414c6d",        "image" : "10.154.52.159:443/test/apache-php:latest",        "imageID" : "docker://sha256:2e233ad9329bd7f65572dd6acb1a03e8839c36abfdb1d1f9012d84d13cecf9fc",        "lastState" : { },        "name" : "container01",        "ready" : true,        "restartCount" : 0,        "state" : {          "running" : {            "startedAt" : "2017-06-28T06:34:46Z"          }        }      } ],      "hostIP" : "192.168.12.187",      "phase" : "Running",      "podIP" : "172.16.56.4",      "startTime" : "2017-06-23T03:31:36Z"    }  } ],  "kind" : "PodList",  "metadata" : {    "resourceVersion" : "1550321",    "selfLink" : "/api/v1/pods"  }}
support.huaweicloud.com/api-cci/listCoreV1PodForAllNamespaces.html