云容器实例 CCI-查询ReplicaSet:响应示例

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

响应示例

状态码: 200

OK

{
  "apiVersion" : "apps/v1",
  "kind" : "ReplicaSet",
  "metadata" : {
    "annotations" : {
      "deployment.kubernetes.io/desired-replicas" : "2",
      "deployment.kubernetes.io/max-replicas" : "2",
      "deployment.kubernetes.io/revision" : "1"
    },
    "creationTimestamp" : "2022-09-06T07:42:15Z",
    "generation" : 1,
    "labels" : {
      "app" : "deployment-test",
      "pod-template-hash" : "86cc979d6d"
    },
    "name" : "replicaset-test",
    "namespace" : "namespace-test",
    "ownerReferences" : [ {
      "apiVersion" : "apps/v1",
      "blockOwnerDeletion" : true,
      "controller" : true,
      "kind" : "Deployment",
      "name" : "deployment-test",
      "uid" : "1e5c7f22-36b3-4a1d-868e-5fc10a98f332"
    } ],
    "resourceVersion" : "41587974",
    "selfLink" : "/apis/apps/v1/namespaces/namespace-test/replicasets/replicaset-test",
    "uid" : "03037364-044e-43ca-bc68-06d07ab0d609"
  },
  "spec" : {
    "replicas" : 2,
    "selector" : {
      "matchLabels" : {
        "app" : "deployment-test",
        "pod-template-hash" : "86cc979d6d"
      }
    },
    "template" : {
      "metadata" : {
        "annotations" : {
          "cri.cci.io/container-type" : "secure-container",
          "log.stdoutcollection.kubernetes.io" : "{\"collectionContainers\": [\"container-0\"]}",
          "metrics.alpha.kubernetes.io/custom-endpoints" : "[{api:'',path:'',port:'',names:''}]"
        },
        "creationTimestamp" : null,
        "labels" : {
          "app" : "deployment-test",
          "pod-template-hash" : "86cc979d6d"
        }
      },
      "spec" : {
        "containers" : [ {
          "image" : "redis",
          "imagePullPolicy" : "IfNotPresent",
          "lifecycle" : { },
          "name" : "container-0",
          "resources" : {
            "limits" : {
              "cpu" : "500m",
              "memory" : "1Gi"
            },
            "requests" : {
              "cpu" : "500m",
              "memory" : "1Gi"
            }
          },
          "terminationMessagePath" : "/dev/termination-log",
          "terminationMessagePolicy" : "File"
        } ],
        "dnsConfig" : { },
        "dnsPolicy" : "ClusterFirst",
        "imagePullSecrets" : [ {
          "name" : "imagepull-secret"
        } ],
        "restartPolicy" : "Always",
        "schedulerName" : "default-scheduler",
        "securityContext" : { },
        "terminationGracePeriodSeconds" : 30
      }
    }
  },
  "status" : {
    "availableReplicas" : 2,
    "fullyLabeledReplicas" : 2,
    "observedGeneration" : 1,
    "readyReplicas" : 2,
    "replicas" : 2
  }
}
support.huaweicloud.com/api-cci/readAppsV1NamespacedReplicaSet.html