List Cluster Namespaces
get_namespacesLists cluster namespaces with status and age, excluding system namespaces by default, to help you find valid namespace names before using namespace-scoped tools.
Instructions
List namespaces in a cluster along with their status and age, excluding system namespaces by default.
Returns cluster_id, count, and items for cluster_id. By default (include_system=False) hides configured system namespaces such as kube-system; set include_system=True to include control-plane and system namespaces.
Use to discover valid namespace names before calling namespace-scoped tools. Prefer get_namespace_resources once you already know the target namespace and want its pods, services, and configs.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cluster_id": "<cluster_id>"
},
"name": "get_namespaces"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cluster_id | Yes | Unique KubeOrbit cluster identifier returned by `list_teams_and_clusters` (1-63 URL-safe chars, e.g. 'gke-prod-us', 'eks-staging'). | |
| include_system | No | When false (default), excludes configured system namespaces (e.g. kube-system, kube-public, kube-node-lease) to match the portal's default view. Set to true to include all system and control-plane namespaces. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Total number of namespaces returned. | |
| items | No | Normalized namespace entries with name, status, labels, and age. | |
| cluster_id | No | Cluster identifier queried. |