get_daemonset_summaries
List DaemonSet summaries in a namespace or across all namespaces to check desired, ready, and scheduled pod counts per node and spot rollout shortfalls.
Instructions
Retrieves a list of DaemonSetSummary objects for DaemonSets in a given
namespace or all namespaces, similar to kubectl get daemonsets -o wide.
A DaemonSet runs one pod on each node it targets; its pods are named
"<daemonset>-<5 characters>" and have `owner` "DaemonSet/<daemonset>" in
`get_pod_summaries`. A shortfall between the counts below ("desired 5,
ready 4") is often the first sign of a problem with a particular node.
Parameters
----------
namespace : Optional[str], default=None
The specific namespace to list DaemonSets from. If None, lists from all
namespaces.
Returns
-------
list of DaemonSetSummary
A list of DaemonSetSummary objects, each with the following fields:
name : str
Name of the DaemonSet.
namespace : str
Namespace in which the DaemonSet runs.
desired_number_scheduled : int
Number of nodes that should be running the DaemonSet's pod - the
actual number of nodes it targets.
current_number_scheduled : int
Number of nodes running at least one of its pods that should.
number_ready : int
Number of nodes whose pod is ready.
updated_number_scheduled : int
Number of nodes running a pod from the current pod template. Less
than desired means a rollout is in progress or stuck.
number_available : int
Number of nodes whose pod has been ready for at least minReadySeconds.
number_misscheduled : int
Number of nodes running its pod that should not be.
node_selector : dict[str, str]
The pod template's nodeSelector (kubectl's NODE SELECTOR column).
Many DaemonSets choose their nodes with node affinity and
tolerations instead, which this does not show, so an empty selector
does not mean "every node"; desired_number_scheduled is the count.
update_strategy : str
Update strategy type ("RollingUpdate" or "OnDelete").
images : list[str]
Container images of the current pod template, in container order. A
pod running a different image is from an earlier revision.
age : datetime.timedelta
Age of the DaemonSet (current time minus creation timestamp).
Raises
------
K8sConfigError
If unable to initialize the K8S API.
K8sApiError
If the API call to list DaemonSets fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |