Cluster Inventory¶
Overview¶
A Kelvin edge service running on each Cluster reports the Kubernetes resources that are running on it to the Kelvin Platform. This includes your Workloads, the Kelvin services, and any other Kubernetes resource such as Pods, Deployments, ConfigMaps and Namespaces.
The Cluster Inventory is a mirror of those resources. You can query it from the Kelvin Platform without connecting to the Cluster, to see what is running on the Cluster and the status of each resource.
Note
The Cluster Inventory is mostly intended for debugging. There is currently no page for it in the Kelvin UI, so it is available with Kelvin API only.
The list shows the resources last reported by the Cluster. If the Cluster is offline, you will see the last state it reported before it went offline.
List Cluster Inventory¶
Returns the list of resources last reported by a Cluster. The list can be filtered and sorted on the server before it is returned.
Note
The kelvin.permission.cluster.read permission is required.
Parameters¶
| Parameter | Description |
|---|---|
cluster_name |
Required. The name of the Cluster to list the resources of. |
search |
Filter the list on the resource name. It is case insensitive and finds partial matches. |
namespace |
Filter the list on the resource namespace. The full name is needed. You can set more than one and they are treated as OR. |
kind |
Filter the list on the resource kind, for example Pod, Deployment, ConfigMap or Namespace. The full name is needed. You can set more than one and they are treated as OR. |
ready |
Filter the list on whether the resource is ready (true or false). Resources of a kind that has no readiness notion are not returned when this filter is set. |
sort_by |
Sort the list by one or more of namespace, kind, name, ready, status, restarts and updated. The default is namespace, kind and name. |
direction |
The sorting order of sort_by, asc (default) or desc. |
pagination_type |
cursor (default), limits or stream. stream returns all the results. |
page_size |
The number of resources in each page, from 1 to 10000. The default is 20. |
Response¶
Each resource in the list has the following fields;
| Field | Description |
|---|---|
kind |
The Kubernetes kind of the resource. |
name |
The name of the resource, unique within its namespace and kind. |
namespace |
The Kubernetes namespace containing the resource. |
ready |
Whether the resource is ready. It is null when the kind has no readiness notion. |
restarts |
The number of container restarts reported for the resource. |
status |
The status phase or reason reported by Kubernetes for the resource. |
summary |
A summary of the details of the resource. The content depends on the kind. |
updated |
The UTC time when the resource summary last changed. |
This can not be viewed in the Kelvin UI.
| API cURL Example | |
|---|---|
The response will look like this;
| API cURL Example Response | |
|---|---|
You will receive an output like this;