get_namespaces
Retrieve a summary of Kubernetes cluster namespaces, including name, status, and age, similar to kubectl get namespace
. Simplifies namespace monitoring without manual API calls.
Instructions
Return a summary of the namespaces for this Kubernetes cluster, similar to that
returned by kubectl get namespace
.
Parameters
----------
None
This function does not take any parameters.
Returns
-------
list of NamespaceSummary
List of namespace summary objects. Each NamespaceSummary has the following fields:
name : str
Name of the namespace.
status : str
Status phase of the namespace.
age : datetime.timedelta
Age of the namespace (current time minus creation timestamp).
Raises
------
K8sConfigError
If unable to initialize the K8S API.
K8sApiError
If the API call to list namespaces fails.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
No arguments |
Input Schema (JSON Schema)
{
"properties": {},
"title": "get_namespacesArguments",
"type": "object"
}