• Русский
  • Cluster [v1]

    /auth/v1/clusters

    get list clusters by rbac

    Parameters

    • Authorization (in header): string

      Given Bearer token will use this as authorization for the API

    • labelSelector (in query): string

      A selector to restrict the list of returned objects by their labels.

    • fieldSelector (in query): string

      A selector to restrict the list of returned objects by their fields.

    • limit (in query): integer

      limit the number of returned records.

    • continue (in query): string

      continue token for paginated queries.

    • resourceVersion (in query): string

      resourceVersion sets a constraint on what resource versions a request may be served from.

    • watch (in query): boolean

      watch for changes to the described resources.

    • timeoutSeconds (in query): integer

      timeoutSeconds for the list/watch call.

    Response

    • 200 ClusterList: OK
    • 401 : Unauthorized - Invalid or missing authentication credentials

    ClusterList

    ClusterList is a list of Cluster resources.

    ListMeta

    • continue: string
    • remainingItemCount: integer
    • resourceVersion: string
    • selfLink: string

    Cluster

    Cluster contains information about a cluster in a cluster registry.

    • apiVersion: string

      APIVersion defines the versioned schema of this representation of an object.

    • kind: string

      Kind is a string value representing the REST resource this object represents.

    • metadata: ObjectMeta

      ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.

    • spec: ClusterSpec

      Spec is the specification of the cluster.

    • status: ClusterStatus

      Status is the status of the cluster.

    ClusterSpec

    Spec is the specification of the cluster.

    ClusterAuthInfo

    ClusterAuthReference

    • kind: string
    • name: string
    • namespace: string

    KubernetesAPIEndpoints

    • caBundle: string

      CABundle contains the certificate authority information.

    • serverEndpoints: []ServerAddressByClientCIDR

      ServerEndpoints specifies API server addresses for clients.

    ServerAddressByClientCIDR

    • clientCIDR: string

      CIDR used by clients to match the corresponding server address.

    • serverAddress: string

      Server address suitable for a client in the matching CIDR.

    ClusterStatus

    Status is the status of the cluster.

    • conditions: []ClusterCondition

      Conditions contains the different condition statuses for this cluster.

    • type: string

      Type contains the type of this cluster.

    • version: string

      Version contains the kubernetes version for this cluster.

    ClusterCondition

    ClusterCondition contains condition information for a cluster.

    • lastHeartbeatTime: string

      LastHeartbeatTime is the last time this condition was updated.

    • lastTransitionTime: string

      LastTransitionTime is the last time the condition changed from one status to another.

    • message: string

      Message is a human-readable message indicating details about the last status change.

    • reason: string

      Reason is a brief reason for the condition's last status change.

    • status: string

      Status is one of True, False, Unknown.

    • type: string

      Type is the type of the cluster condition.

    API usage

    This API does not use /kubernetes/{cluster} as a path prefix.

    GET /auth/v1/clusters

    Common query parameters:

    ParameterTypeDescription
    labelSelectorstringRestricts returned clusters by labels.
    fieldSelectorstringRestricts returned clusters by fields, such as metadata.name.
    limitintegerLimits the number of returned records.
    continuestringContinue token for paginated queries.
    resourceVersionstringConstrains what resource versions the request may be served from.
    watchbooleanWatches for changes to clusters.
    timeoutSecondsintegerTimeout for list/watch requests.

    Request example

    curl -H "Authorization: Bearer ${TOKEN}" \
      "${APISERVER}/auth/v1/clusters?fieldSelector=metadata.name=${CLUSTER_NAME}"

    Response example

    {
      "apiVersion": "clusterregistry.k8s.io/v1alpha1",
      "kind": "ClusterList",
      "metadata": {
        "resourceVersion": "12345678",
        "continue": ""
      },
      "items": [
        {
          "metadata": {
            "name": "cluster-a"
          },
          "spec": {
            "kubernetesApiEndpoints": {
              "serverEndpoints": [
                {
                  "serverAddress": "https://api.cluster-a.example.com"
                }
              ]
            }
          },
          "status": {
            "type": "Kubernetes",
            "version": "v1.30.0"
          }
        }
      ]
    }

    Notes

    • This API returns clusters filtered by RBAC.
    • Some sensitive fields are filtered from the response by the backend.