云容器实例 CCI-查询指定namespace下的ReplicaSets:响应示例

时间:2023-12-01 17:06:30

响应示例

状态码: 200

OK

{
  "apiVersion" : "apps/v1",
  "items" : [ {
    "metadata" : {
      "annotations" : {
        "deployment.kubernetes.io/desired-replicas" : "1",
        "deployment.kubernetes.io/max-replicas" : "2",
        "deployment.kubernetes.io/revision" : "1"
      },
      "creationTimestamp" : "2017-12-12T11:27:15Z",
      "generation" : 1,
      "labels" : {
        "name" : "deployment-test",
        "pod-template-hash" : "800400086"
      },
      "name" : "deployment-test-800400086",
      "namespace" : "default",
      "ownerReferences" : [ {
        "apiVersion" : "extensions/v1beta1",
        "blockOwnerDeletion" : true,
        "controller" : true,
        "kind" : "Deployment",
        "name" : "deployment-test",
        "uid" : "6776d16b-df2f-11e7-961f-fa163ed139d5"
      } ],
      "resourceVersion" : "784294",
      "selfLink" : "/apis/extensions/v1beta1/namespaces/default/replicasets/deployment-test-800400086",
      "uid" : "67775454-df2f-11e7-961f-fa163ed139d5"
    },
    "spec" : {
      "replicas" : 1,
      "selector" : {
        "matchLabels" : {
          "name" : "deployment-test",
          "pod-template-hash" : "800400086"
        }
      },
      "template" : {
        "metadata" : {
          "creationTimestamp" : null,
          "labels" : {
            "name" : "deployment-test",
            "pod-template-hash" : "800400086"
          }
        },
        "spec" : {
          "containers" : [ {
            "image" : "172.16.5.235:20202/test/testnginx:v3",
            "imagePullPolicy" : "IfNotPresent",
            "name" : "deployment-test",
            "resources" : { },
            "terminationMessagePath" : "/dev/termination-log",
            "terminationMessagePolicy" : "File"
          } ],
          "dnsPolicy" : "ClusterFirst",
          "restartPolicy" : "Always",
          "schedulerName" : "default-scheduler",
          "securityContext" : { }
        }
      }
    },
    "status" : {
      "fullyLabeledReplicas" : 1,
      "observedGeneration" : 1,
      "replicas" : 1
    }
  }, {
    "metadata" : {
      "annotations" : {
        "deployment.kubernetes.io/desired-replicas" : "2",
        "deployment.kubernetes.io/max-replicas" : "2",
        "deployment.kubernetes.io/revision" : "1"
      },
      "creationTimestamp" : "2017-12-13T07:28:36Z",
      "generation" : 1,
      "labels" : {
        "app" : "test-pv",
        "pod-template-hash" : "446136006"
      },
      "name" : "test-pv-446136006",
      "namespace" : "default",
      "ownerReferences" : [ {
        "apiVersion" : "extensions/v1beta1",
        "blockOwnerDeletion" : true,
        "controller" : true,
        "kind" : "Deployment",
        "name" : "test-pv",
        "uid" : "3b3d3a22-dfd7-11e7-961f-fa163ed139d5"
      } ],
      "resourceVersion" : "784441",
      "selfLink" : "/apis/extensions/v1beta1/namespaces/default/replicasets/test-pv-446136006",
      "uid" : "3b3dee35-dfd7-11e7-961f-fa163ed139d5"
    },
    "spec" : {
      "replicas" : 2,
      "selector" : {
        "matchLabels" : {
          "app" : "test-pv",
          "pod-template-hash" : "446136006"
        }
      },
      "template" : {
        "metadata" : {
          "annotations" : {
            "metrics.alpha.kubernetes.io/custom-endpoints" : "[{api:'',path:'',port:'',names:''}]"
          },
          "creationTimestamp" : null,
          "labels" : {
            "app" : "test-pv",
            "pod-template-hash" : "446136006"
          }
        },
        "spec" : {
          "affinity" : { },
          "containers" : [ {
            "image" : "172.16.5.235:20202/test/nginx:latest",
            "imagePullPolicy" : "Always",
            "lifecycle" : { },
            "name" : "container-0",
            "resources" : { },
            "terminationMessagePath" : "/dev/termination-log",
            "terminationMessagePolicy" : "File",
            "volumeMounts" : [ {
              "mountPath" : "/tmp0",
              "name" : "wwww",
              "readOnly" : true
            } ]
          } ],
          "dnsPolicy" : "ClusterFirst",
          "imagePullSecrets" : [ {
            "name" : "imagepull-secret"
          } ],
          "restartPolicy" : "Always",
          "schedulerName" : "default-scheduler",
          "securityContext" : { },
          "volumes" : [ {
            "name" : "wwww",
            "persistentVolumeClaim" : {
              "claimName" : "pvc1513149915389"
            }
          } ]
        }
      }
    },
    "status" : {
      "availableReplicas" : 2,
      "fullyLabeledReplicas" : 2,
      "observedGeneration" : 1,
      "readyReplicas" : 2,
      "replicas" : 2
    }
  } ],
  "kind" : "ReplicaSetList",
  "metadata" : {
    "resourceVersion" : "793174",
    "selfLink" : "/apis/apps/v1/namespaces/default/replicasets"
  }
}
support.huaweicloud.com/api-cci/listAppsV1NamespacedReplicaSet.html