K8SNAMESPACE: K8s Namespace
A Kubernetes namespace providing logical isolation, resource quotas, and RBAC boundaries within a cluster.
Default definition. This article describes the default
K8SNAMESPACE definition shipped with DemandFlow. Administrators can add, remove, rename, or re-type fields, change which ones are required, and alter the layout from the Definitions screen in Settings. Your tenant's current schema may differ from what is shown here. To read the current definition at any time, GET the DEFINITION object whose id matches K8SNAMESPACE.Entity properties
| Property | Value |
|---|---|
| Entity code | K8SNAMESPACE |
| Display name | K8s Namespace |
| Plural | K8s Namespaces |
| Level | 401 |
Use cases
K8SNAMESPACE sits directly below K8SCLUSTER and acts as the organisational boundary for all workloads, services, configurations, storage, and policies. The cluster objectLookup field establishes the parent relationship. Purpose and environment selects allow namespaces to be tagged independently of the cluster environment, supporting multi-tenant patterns where a single cluster hosts dev, staging, and prod namespaces.
Fields
Namespace Information
| Field | Type | Required | Notes |
|---|---|---|---|
name | text | Yes | Kubernetes namespace name |
cluster | reference → K8SCLUSTER | Yes | Cluster. |
purpose | enum | Valid ids: 1 (Application), 2 (Infrastructure), 3 (Development), 4 (Testing), 5 (Staging), 6 (Production), 7 (Monitoring), 8 (Security), 9 (System). | |
status | enum | Yes | Valid ids: 1 (Active), 2 (Terminating), 3 (Failed), 4 (Pending). |
environment | enum | Valid ids: 1 (Production), 2 (Staging), 3 (Development), 4 (Test), 5 (QA), 6 (UAT), 7 (DR). |
Resource Quotas
| Field | Type | Required | Notes |
|---|---|---|---|
cpuRequest | number | CPU Request (cores). | |
cpuLimit | number | CPU Limit (cores). | |
memoryRequest | number | Memory Request (GB). | |
memoryLimit | number | Memory Limit (GB). | |
storageRequest | number | Storage Request (GB). | |
storageLimit | number | Storage Limit (GB). | |
podQuota | number | Maximum number of pods | |
serviceQuota | number | Maximum number of services |
Current Usage
| Field | Type | Required | Notes |
|---|---|---|---|
podCount | number | Current Pods. | |
serviceCount | number | Current Services. | |
cpuUsage | gauge | CPU Usage %. | |
memoryUsage | gauge | Memory Usage %. | |
storageUsed | number | Storage Used (GB). | |
ingressCount | number | Ingress Count. | |
configMapCount | number | ConfigMaps. | |
secretCount | number | Secrets. |
Labels & Annotations
| Field | Type | Required | Notes |
|---|---|---|---|
labels | text (multi-line) | Key-value pairs (JSON format) | |
annotations | text (multi-line) | Key-value pairs (JSON format) | |
owner | reference → US | Owner. | |
costCenter | text | Cost Center. | |
projectCode | text | Project Code. |
Network & Security
| Field | Type | Required | Notes |
|---|---|---|---|
defaultNetworkPolicy | enum | Valid ids: 1 (Allow All), 2 (Deny All), 3 (Allow Same Namespace), 4 (Custom). | |
defaultServiceAccount | text | Default Service Account. | |
imagePullSecrets | text (multi-line) | Comma-separated list | |
podSecurityPolicy | text | Pod Security Policy. | |
rbacEnabled | boolean | RBAC Enabled. | |
isolationEnabled | boolean | Network Isolation. |
Cost Analysis
| Field | Type | Required | Notes |
|---|---|---|---|
estimatedMonthlyCost | number | Est. Monthly Cost. | |
actualMonthlyCost | number | Actual Monthly Cost. | |
cpuCost | number | CPU Cost. | |
memoryCost | number | Memory Cost. | |
storageCost | number | Storage Cost. | |
networkCost | number | Network Cost. | |
costTrend | enum | Valid ids: 1 (Decreasing), 2 (Stable), 3 (Increasing). | |
costOptimizationScore | gauge | Optimization Score. |
Additional panels
- Dashboard panel attached.
Relationships
- Lookups:
clusterpoints at aK8SCLUSTERrecord;ownerpoints at aUSrecord. - Related lists:
K8SWORKLOAD,K8SSERVICE,K8SCONFIGURATION,K8SSTORAGE,K8SNETPOLICY.
Creating a K8s Namespace via the API
POST /v1/objects
Authorization: Bearer <your-pat>
Content-Type: application/json
{
"entity": "K8SNAMESPACE",
"level": 401,
"comboKey": "SUB:<your-sub-id>|ENT:",
"name": "Example",
"cluster": "",
"status": "1",
"purpose": "1"
}
Listing K8s Namespaces
# All records in your tenant
GET /v1/entities/K8SNAMESPACE/SUB:<your-sub-id>