K8SSERVICE: K8s Service
A Kubernetes Service providing stable network endpoints and load balancing for workloads within or across namespaces.
Default definition. This article describes the default
K8SSERVICE 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 K8SSERVICE.Entity properties
| Property | Value |
|---|---|
| Entity code | K8SSERVICE |
| Display name | K8s Service |
| Plural | K8s Services |
| Level | 403 |
Use cases
K8SSERVICE models the Kubernetes Service resource that decouples network access from individual pod IPs. The serviceType select (ClusterIP, NodePort, LoadBalancer, ExternalName, Headless) determines how traffic reaches the backing pods and drives the visibility of subsequent fields like nodePort and loadBalancerIP. The namespace objectLookup links to K8SNAMESPACE.
Fields
Service Information
| Field | Type | Required | Notes |
|---|---|---|---|
name | text | Yes | Service Name |
namespace | reference → K8SNAMESPACE | Yes | Namespace |
serviceType | enum | Yes | Service Type Valid ids: 1 (ClusterIP), 2 (NodePort), 3 (LoadBalancer), 4 (ExternalName), 5 (Headless). |
clusterIP | text | Cluster IP Read only. | |
externalIP | text | External IP |
Port Configuration
| Field | Type | Required | Notes |
|---|---|---|---|
ports | text (multi-line) | Port mappings (JSON format) | |
targetPort | number | Target Port | |
nodePort | number | For NodePort services | |
protocol | enum | Protocol Valid ids: 1 (TCP), 2 (UDP), 3 (SCTP). |
Selectors & Endpoints
| Field | Type | Required | Notes |
|---|---|---|---|
selector | text (multi-line) | Label selector (JSON) | |
endpointCount | number | Endpoint Count Read only. | |
healthyEndpoints | number | Healthy Endpoints Read only. | |
sessionAffinity | enum | Session Affinity Valid ids: 1 (None), 2 (ClientIP). | |
sessionAffinityTimeout | number | Session Timeout (sec) |
Load Balancer Configuration
| Field | Type | Required | Notes |
|---|---|---|---|
loadBalancer | text | Load Balancer Read only. | |
loadBalancerIP | text | Load Balancer IP | |
loadBalancerSourceRanges | text (multi-line) | Allowed source IPs (CIDR) | |
loadBalancerClass | text | Load Balancer Class | |
externalTrafficPolicy | enum | External Traffic Policy Valid ids: 1 (Cluster), 2 (Local). |
Health Checks
| Field | Type | Required | Notes |
|---|---|---|---|
healthCheckNodePort | number | Health Check Node Port | |
healthCheckPath | text | Health Check Path | |
healthCheckInterval | number | Check Interval (sec) | |
healthCheckTimeout | number | Check Timeout (sec) | |
healthyThreshold | number | Healthy Threshold | |
unhealthyThreshold | number | Unhealthy Threshold |
Service Discovery
| Field | Type | Required | Notes |
|---|---|---|---|
dnsName | text | Cluster DNS name Read only. | |
externalName | text | For ExternalName services | |
publishNotReadyAddresses | boolean | Publish Not Ready Addresses | |
ipFamily | multiselect | IP Families | |
ipFamilyPolicy | enum | IP Family Policy Valid ids: 1 (SingleStack), 2 (PreferDualStack), 3 (RequireDualStack). |
Annotations & Labels
| Field | Type | Required | Notes |
|---|---|---|---|
labels | text (multi-line) | Key-value pairs (JSON) | |
annotations | text (multi-line) | Key-value pairs (JSON) | |
ingressClass | text | For ingress integration |
Service Endpoints
| Field | Type | Required | Notes |
|---|---|---|---|
endpoints | text (multi-line) | Current endpoint addresses Read only. | |
manualEndpoints | text (multi-line) | Manually configured endpoints | |
endpointSlices | boolean | Use Endpoint Slices | |
topologyKeys | text (multi-line) | Service topology constraints |
Service Metrics
| Field | Type | Required | Notes |
|---|---|---|---|
requestsPerSecond | number | Requests/sec Read only. | |
avgResponseTime | number | Avg Response Time (ms) Read only. | |
errorRate | gauge | Error Rate % Read only. | |
availability | gauge | Availability % Read only. | |
activeConnections | number | Active Connections Read only. | |
bandwidthIn | number | Bandwidth In (MB/s) Read only. | |
bandwidthOut | number | Bandwidth Out (MB/s) Read only. | |
p99Latency | number | P99 Latency (ms) Read only. |
Network Policies
| Field | Type | Required | Notes |
|---|---|---|---|
networkPolicies | multiselect | Applied Network Policies | |
allowedNamespaces | text (multi-line) | Namespaces that can access this service | |
deniedNamespaces | text (multi-line) | Namespaces blocked from this service | |
rateLimitEnabled | boolean | Rate Limiting Enabled | |
rateLimit | number | Rate Limit (req/min) | |
authRequired | boolean | Authentication Required | |
authType | enum | Auth Type Valid ids: 1 (None), 2 (Basic), 3 (Bearer Token), 4 (mTLS), 5 (OAuth2). |
Relationships
- Lookups:
namespacepoints at aK8SNAMESPACErecord. - Related lists:
K8SINGRESS,K8SWORKLOAD.
Creating a K8s Service via the API
POST /v1/objects
Authorization: Bearer <your-pat>
Content-Type: application/json
{
"entity": "K8SSERVICE",
"level": 403,
"comboKey": "SUB:<your-sub-id>|ENT:",
"name": "Example",
"namespace": "",
"serviceType": "1"
}
Listing K8s Services records
# All k8s services in your tenant
GET /v1/entities/K8SSERVICE/SUB