Retrieve Kubernetes Cluster Events
GET https://infrahub-api.nexgencloud.com/v1/core/clusters/{id}/events
Retrieve a list of events for a specified Kubernetes cluster, providing detailed information for each, including the type of event, event ID, timestamp, and a message describing the event.
Path parameters
id integer
Required
The ID of the cluster for which to retrieve event logs. You can obtain the cluster ID by calling the List Clusters API.
Attributes
status boolean
Indicates the result of the request to retrieve cluster events. true
signifies success, while false
indicates an error.
message string
A description of the status of the request.
cluster_events array of objects
An array of objects each containing details about an event for the specified cluster.
Show child attributes
id integer
The unique identifier of the event.
cluster_id integer
The ID of the cluster associated with the event.
user_id integer
The ID of the user who initiated or was associated with the event.
org_id integer
The ID of the organization associated with the event.
time date-time
The timestamp when the event occurred.
type string
The type of event (e.g., "normal"
).
reason string
A code or label describing the reason for the event (e.g., "ClusterCreationSuccess"
).
Possible values:
ClusterCreationSuccess
: The cluster was created successfully.ClusterUpdateSuccess
: The cluster was updated successfully.ClusterDeleteSuccess
: The cluster was deleted successfully.ClusterCreationFailed
: Cluster creation failed.ClusterDeleteFailed
: Cluster deletion failed.
object string
The name of the cluster related to the event.
message string
A message describing the operation performed on the cluster.
curl -X GET "https://infrahub-api.nexgencloud.com/v1/core/clusters/{id}/events" \
-H "accept: application/json"\
-H "api_key: YOUR API KEY"
- To authenticate Infrahub API requests, add an
api_key
header to your API request that contains an API Key.
{
"status": true,
"message": "Successfully retrived events for Cluster example-cluster",
"cluster_events": [
{
"id": 1623,
"cluster_id": 341,
"user_id": 4064,
"org_id": 3971,
"time": "2025-02-17T16:53:01",
"type": "normal",
"reason": "ClusterCreationSuccess",
"object": "example-cluster",
"message": "Cluster example-cluster Created Successfully."
}
]
}
Returns
Returns the status of request and an array of cluster_events
objects containing details about the specified clusters events.