get_pod_container_statuses
Retrieve detailed statuses of all containers within a specified Kubernetes pod, including readiness, restarts, resource usage, and lifecycle state information.
Instructions
Get the status for all containers in a specified Kubernetes pod.
Parameters
----------
pod_name : str
Name of the pod to retrieve container statuses for.
namespace : str, optional
Namespace of the pod (default is "default").
Returns
-------
list of ContainerStatus
List of container status objects for the specified pod. Each ContainerStatus has the following fields:
pod_name : str
Name of the pod.
namespace : str
Namespace of the pod.
container_name : str
Name of the container.
image : str
Image name.
ready : bool
Whether the container is currently passing its readiness check.
The value will change as readiness probes keep executing.
restart_count : int
Number of times the container has restarted.
started : Optional[bool]
Started indicates whether the container has finished its postStart
lifecycle hook and passed its startup probe.
stop_signal : Optional[str]
Stop signal for the container.
state : Optional[ContainerState]
Current state of the container.
last_state : Optional[ContainerState]
Last state of the container.
volume_mounts : list[VolumeMountStatus]
Status of volume mounts for the container
resource_requests : dict[str, str]
Describes the minimum amount of compute resources required. If Requests
is omitted for a container, it defaults to Limits if that is explicitly specified,
otherwise to an implementation-defined value. Requests cannot exceed Limits.
resource_limits : dict[str, str]
Describes the maximum amount of compute resources allowed.
allocated_resources : dict[str, str]
Compute resources allocated for this container by the node.
Raises
------
K8sConfigError
If unable to initialize the K8S API.
K8sApiError
If the API call to read the pod 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_container_statusesArguments",
"type": "object"
}