Kubernetes Services NetworkPolicy API is one of 13 APIs that Kubernetes Services publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.
This API exposes 1 JSON Schema definition.
Tagged areas include NetworkPolicy. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, an API reference, an AsyncAPI specification, and 1 JSON Schema.
This API exposes
7 operations
across 3 paths,
and defines 12 schemas.
It is described by OpenAPI 3.1.0, at version v1.32.0.
Requests are made against a single base URL, https://kubernetes.default.svc.
7 operations3 paths12 schemas1 DELETE3 GET1 PATCH1 POST1 PUT
Metadata
The identity and technical contract details declared by the specification.
Kubernetes Services NetworkPolicy API declares
2 security schemes
for authenticating requests.
It accepts HTTP bearer tokens (JWT) (bearerAuth).
It requires mutual TLS (clientCertificate).
By default, every request must be authenticated.
bearerAuth — Kubernetes service account or user bearer token.
clientCertificate — Client TLS certificate signed by the cluster CA.
Paths & Operations 7
Across 3 paths, the API surfaces 7 operations — 1 DELETE, 3 GET, 1 PATCH, 1 POST, 1 PUT. Each is listed below with its method, path, parameters, and response codes.
NetworkPolicy 7
NetworkPolicy resources controlling Pod-level traffic ingress and egress based on label selectors, namespace selectors, and IP CIDR blocks.
Kubernetes Services List NetworkPolicies across all namespaces
listNetworkPoliciesAllNamespaces4 params→ 200401
Schemas 12
The contract defines 12 schemas that model the data the API accepts and returns. The most detailed are ObjectMeta (7 properties), Status (4 properties), NetworkPolicyList (4 properties), NetworkPolicy (4 properties). Each schema is shown below with its type and property counts.
NetworkPolicyList
object
A list of NetworkPolicy objects.
4 properties1 required
NetworkPolicy
object
A NetworkPolicy describes how groups of pods are allowed to communicate with each other and other network endpoints. Policies are additive — if multiple polici…
4 properties
LabelSelector
object
A label selector filtering pods or namespaces by their labels. Combines matchLabels equality requirements with matchExpressions set-based requirements using AN…
2 properties
NetworkPolicyPeer
object
A network policy peer specifying a traffic source (in ingress rules) or destination (in egress rules). Uses AND logic when multiple selector types are combined.
3 properties
NetworkPolicyEgressRule
object
An egress rule allowing outbound traffic from selected pods to specified destinations on specified ports. An empty to list allows traffic to all destinations.
2 properties
NetworkPolicyIngressRule
object
An ingress rule allowing inbound traffic to selected pods from specified sources on specified ports. An empty from list allows traffic from all sources. An emp…
2 properties
NetworkPolicySpec
object
Specification of a NetworkPolicy defining which pods are selected, what policy types apply, and the ingress and egress rules.
4 properties1 required
ObjectMeta
object
Standard Kubernetes object metadata.
7 properties
NetworkPolicyPort
object
A port and protocol combination allowed by a network policy rule. Empty port/protocol fields match all ports and protocols.
3 properties
IPBlock
object
An IP block defined by a CIDR range with optional exceptions, used to allow or restrict traffic to or from specific IP ranges.
2 properties1 required
Status
object
Error or result status.
4 properties
ListMeta
object
Metadata for list responses.
3 properties
Specification
The full machine-readable OpenAPI contract behind this narrative.