- Print
- DarkLight
How To: List the Managed Kubernetes Clusters
Article summary
Did you find this summary helpful?
Thank you for your feedback!
After deploying the RealTheory collector to a Kubernetes cluster (See Installing RealTheory in a Cluster), the cluster and its associated objects become available in the RealTheory API within minutes.
Get Clusters
To get the list of available clusters, call the method below on the K8sSummary endpoint.
GET <endpoint>/theory/api/v1/k8ssummary/clustersummaries?index={index}&count={count}&order={order}&direction={direction}
where
{endpoint}
- is the URL of the RealTheory SaaS portal for your account.{index}
- is the starting index of the cluster summaries to include in the list. This parameter is optional and defaults to 0 if not specified.{count}
- is maximum number of cluster summaries to return. This parameter is optional and defaults to 100 if not specified.{order}
- is a string containing the name of the attribute to sort on. This parameter is optional.{direction}
- is a number that controls the direction of the sort. A value equal to or greater than 0 indicates ascending order; a value less than 0 indicates descending order. This parameter is optional and defaults to 0 if not specified.
Note: All calls to RealTheory APIs must be authenticated and authorized. See Authentication for more details.
Example
GET myendpoint.realtheory.io/theory/api/v1/k8ssummary/clustersummaries?index=0&count=100&order=metadata.name&direction=0
which returns a list of the first 100 cluster summaries, sorted by their name in ascending order.
Note: A cluster summary is an object that summarizes key information related to a Kubernetes cluster.
Output
Returns an array of ClusterSummary objects:
[
{
"metadata": {
"id": "f99e055f-b35d-208b-63b1-f4222b80151a",
"name": "realtheory-cluster-01",
"timestamp": "2024-03-06T19:34:14.6386247Z"
},
"version": "v1.27.9",
"url": "https://10.100.0.1:443/api/v1",
"nodePools": [
{
"name": "nodepool-0",
"instanceType": "Standard_B4ms",
"architecture": "amd64",
"os": "linux",
"size": 2
}
],
"properties": {
"cloud.provider": "Azure",
"cloud.region": "westus2",
"cloud.zone": "0",
"name": "realtheory-cluster-01"
},
...
},
{
"metadata": {
"id": "6cdf94fe-3888-a22f-7420-92e422060949",
"name": "realtheory-cluster-02",
"timestamp": "2024-03-06T19:33:36.3263045Z"
},
"version": "v1.25.16-eks-77b1e4e",
"url": "https://10.200.0.1:443/api/v1",
"nodePools": [
{
"name": "nodepool-0",
"instanceType": "Standard_DS2_v3",
"architecture": "amd64",
"os": "linux",
"size": 5
}
],
"properties": {
"cloud.provider": "AWS",
"cloud.region": "us-east-1",
"cloud.zone": "us-east-1c",
"name": "realtheory-cluster-02"
},
...
}
]
Note: Content has been omitted from the JSON response above for brevity.
Was this article helpful?