#  Infrastructure for Kubernetes: Namespaces

## What are Namespaces?

Namespaces provide a mechanism for isolating groups of resources within a single Kubernetes cluster. They are commonly used to separate workloads by environment (e.g., dev, staging, prod) or by team.

In Kloudfuse, the Namespaces screen helps you monitor resource usage, deployment counts, and workload status across all namespaces. Use it to scope your observability efforts by logical boundaries within a cluster.

## Access the namespaces screen

Go to Infrastructure > Kubernetes > Namespaces.

## Namespace Table Columns

Each row in the table displays key namespace attributes:

- **Cluster** – Cluster where the namespace exists

- **Namespace** – Unique Kubernetes namespace name

- **Status** – Current state of the namespace (e.g., Active)

- **Age** – Time since the namespace was created

- **Usage**
  - **CPU** – Real-time CPU usage across all workloads in the namespace
  - **Memory** – Real-time memory usage across all workloads in the namespace

- **Entity Counts**
  - **Pods** – Total number of running pods in the namespace
  - **Deployments** – Number of deployments in the namespace
  - **Daemon Sets** – Number of daemon sets associated with the namespace
  - **Stateful Sets** – Number of stateful sets defined in the namespace
  - **Cronjobs** – Number of cronjobs scheduled within the namespace

## Filters

Kloudfuse provides three categories of filters to scope your results precisely.

- [Kubernetes Filter](https://docs.kloudfuse.com/platform/3.5.0/infrastructure-kubernetes-filters/#resources)
- [Facets Filter](https://docs.kloudfuse.com/platform/3.5.0/infrastructure-kubernetes-filters/#facets)
- [Additional Filter](https://docs.kloudfuse.com/platform/3.5.0/infrastructure-kubernetes-filters/#additional)

## Search, group, and sort

Use the following options to refine your search view:

### 1. Search

Use the **Search** bar to filter resources such as pods, nodes, clusters, and namespaces using key-value pairs—just like filtering logs in Kloudfuse.

- Auto-suggestions simplify input with live facet and value suggestions.

- **Example:**
    1. Type `cluster` — autocomplete lists matching field names.
    2. Select `cluster` — a new dropdown appears with current cluster names.
    3. Choose one or more cluster names to apply the filter.

This scoped search helps you quickly locate relevant pods by matching attributes such as:
- `cluster`
- `namespace`
- `status`
- `node`
- `deployment`
- and more.

- The search interface dynamically updates based on selected filters and maintains high responsiveness for large clusters.

**Filter Behavior**

- **AND logic** is applied automatically when combining filters with different keys.

- For example:
  ```text
  kube_namespace=datadog status=Running
  ```
  - Returns pods matching both conditions.

|     |     |
| --- | --- |
|  | **AND** is **implicit**. It doesn’t appear in the search bar. |

- **OR logic** appears when selecting multiple values for the same key:

- For example:
  ```text
  kube_namespace=fluentd OR kube_namespace=datadog
  ```
  - Returns pods from either `fluentd` or `datadog` namespaces.

|     |     |
| --- | --- |
|  | Selecting filters in the sidebar updates the search bar automatically.<br>Typing directly in the search bar updates the sidebar filters.<br>This two-way sync keeps your filter view consistent. |

### 2. Group By

Group resources—such as Pods, Clusters, Namespaces, or Nodes—by shared attributes to simplify analysis and troubleshooting. Use the  icon to toggle between grouped and ungrouped views.

Common groupings include:
- **Cluster** – See how resources are distributed across clusters.
- **Namespace** – Organize by logical boundaries within the cluster.
- **Node** – Identify which node is hosting the resource.
- **Status** – Group by lifecycle status (Running, Pending, etc.)

Grouping improves visibility into resource alignment, health, and usage patterns.

### 3. Sort

Use the  icon to sort the list by any column in ascending or descending order.

Click the column header to toggle sort direction. Use sorting to identify highest resource usage, longest-running pods, or newest deployments.

Click any row to inspect namespace-level logs, metrics, configurations, or related events.

## Namespace Detail pane

You can filter directly from visible fields in the pane, including:
- **Cluster**, **Namespace**, and **Node**
- Linked **Deployment**, **Replica Set**, and **Service**
- Pod **IP address** and **QoS Class**
- **Restart count** and **Container readiness**

All fields are clickable and filterable.

Kloudfuse includes all attached Kubernetes metadata and any custom tags. Click on any labels and tags to filter the view.

**Custom tags**
- `kfuse:true`
- `kube_condition_containersready:true`

**Kubernetes labels**
- `app_kubernetes_io_name`
- `pod_template_hash`
- `kube_app_instance`
- `kube_cluster_name`

Each namespace view includes multiple tabs for deeper observability. The namespace detail pane contains four tabs. These include:
- [YAML](https://docs.kloudfuse.com/platform/3.5.0/infrastructure-kubernetes-namespaces/#namespace-yaml)
- [Logs](https://docs.kloudfuse.com/platform/3.5.0/infrastructure-kubernetes-namespaces/#namespace-logs)
- [Metrics](https://docs.kloudfuse.com/platform/3.5.0/infrastructure-kubernetes-namespaces/#namespace-metrics)
- [Events](https://docs.kloudfuse.com/platform/3.5.0/infrastructure-kubernetes-namespaces/#namespace-events)

## YAML

Use the **YAML** tab to inspect the live configuration of your Kubernetes resource.

**YAML Display pane**
- View full manifest details for pods, deployments, nodes, etc.
- Quickly detect misconfigurations or missing annotations.
- Copy YAML for debugging or backup purposes.

## Logs

Use the **Logs** tab to inspect real-time application and system logs for a selected Kubernetes resource.

**Logs Display pane**
- Select specific containers to view logs at a granular level.

Log search supports full-text match, tag selection, and time-range filters.

## Metrics

The **Metrics** tab displays real-time CPU, memory, network, and disk usage for the selected resource.

**Metrics Display pane**
- Visualize container-level metrics and trends.
- Correlate spikes or anomalies with logs or events.
- Use chart time selectors to view metrics at different intervals (e.g., last 5m, 1h, 24h).

## Events

Use the **Events** tab to view scheduled updates, restarts, warnings, or failed operations for a Kubernetes resource.

**Events Display pane**
- Events include timestamps and source controllers.
- Use this tab to diagnose readiness failures, scaling issues, or resource evictions.
- Combine with Logs and Metrics for faster RCA.
