get_pod_events
Retrieve detailed events for a specific Kubernetes pod by specifying its name and namespace. Use this functionality to monitor and troubleshoot pod behavior in your cluster.
Instructions
Get events for a specific Kubernetes pod. This is equivalent to the kubectl command:
`kubectl get events -n NAMESPACE --field-selector involvedObject.name=POD_NAME,involvedObject.kind=Pod`
Parameters
----------
pod_name : str
Name of the pod to retrieve events for.
namespace : str, optional
Namespace of the pod (default is "default").
Returns
-------
list of EventSummary
List of events associated with the specified pod. Each EventSummary has the following fields:
last_seen : Optional[datetime.datetime]
Timestamp of the last occurrence of the event (if available).
type : str
Type of the event.
reason : str
Reason for the event.
object : str
The object this event applies to.
message : str
Message describing the event.
Raises
------
K8sConfigError
If unable to initialize the K8S API.
K8sApiError
If the API call to list events fails.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
namespace | No | default | |
pod_name | Yes |
Input Schema (JSON Schema)
{
"properties": {
"namespace": {
"default": "default",
"title": "Namespace",
"type": "string"
},
"pod_name": {
"title": "Pod Name",
"type": "string"
}
},
"required": [
"pod_name"
],
"title": "get_pod_eventsArguments",
"type": "object"
}