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

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

响应示例

状态码: 200

OK

{
  "apiVersion" : "apps/v1beta1",
  "items" : [ {
    "metadata" : {
      "creationTimestamp" : "2017-04-18T06:05:02Z",
      "generateName" : "sz",
      "generation" : 1,
      "labels" : {
        "app" : "mysql"
      },
      "name" : "mysql",
      "namespace" : "default",
      "resourceVersion" : "1809843",
      "selfLink" : "/apis/apps/v1beta1/namespaces/default/statefulsets/mysql",
      "uid" : "f5cf50f5-23fc-11e7-9c83-fa163ec08232"
    },
    "spec" : {
      "replicas" : 1,
      "selector" : {
        "matchLabels" : {
          "app" : "mysql"
        }
      },
      "serviceName" : "mysql-service",
      "template" : {
        "metadata" : {
          "creationTimestamp" : null,
          "labels" : {
            "app" : "mysql"
          },
          "name" : "-sz"
        },
        "spec" : {
          "containers" : [ {
            "image" : "10.154.52.159:443/test/nginx:latest",
            "imagePullPolicy" : "IfNotPresent",
            "name" : "container01",
            "ports" : [ {
              "containerPort" : 80,
              "protocol" : "TCP"
            } ],
            "resources" : { },
            "terminationMessagePath" : "/dev/termination-log"
          } ],
          "dnsPolicy" : "ClusterFirst",
          "restartPolicy" : "Always",
          "securityContext" : { }
        }
      },
      "volumeClaimTemplates" : [ {
        "metadata" : {
          "creationTimestamp" : null,
          "name" : "db"
        },
        "spec" : {
          "accessModes" : [ "ReadWriteOnce" ],
          "resources" : {
            "requests" : {
              "storage" : "1Gi"
            }
          }
        },
        "status" : {
          "phase" : "Pending"
        }
      } ]
    },
    "status" : {
      "replicas" : 1
    }
  } ],
  "kind" : "StatefulSetList",
  "metadata" : {
    "resourceVersion" : "1809953",
    "selfLink" : "/apis/apps/v1beta1/statefulsets"
  }
}
support.huaweicloud.com/api-cci/listAppsV1StatefulSetForAllNamespaces.html