NetworkPolicy
Allow list for pod traffic at layer 3 and 4, isolating the pods it selects and enforced by the network plugin.
| property | type | values | required | kind default | this component |
|---|---|---|---|---|---|
| additiveRules | boolean | — | no | true | inherited |
| defaultAction | enum | allow | deny | no | — | ▸ deny |
| intrusionPrevention | boolean | — | no | — | inherited |
| logging | boolean | — | no | — | inherited |
| managed | boolean | — | no | false | ▸ false |
| pluginEnforcementRequired | boolean | — | no | true | inherited |
| policyScope | enum | ingress | egress | ingress-egress | no | ingress | inherited |
| ruleCount | integer | — | no | — | inherited |
| stateful | boolean | — | no | — | ▸ true |
Every rule whose selector covers this component's kind or its category. Whether a rule fires depends on the design: its properties, its edges and its groups.
No rule reads this kind yet. That is a gap, not a guarantee.
nodes:
- { id: "network-policy", component: "k8s-network-policy" }Cloud Firewallalibaba-cloud-firewallNetwork ACLalibaba-network-aclECS Security Groupalibaba-security-groupNetwork ACLaws-network-aclAWS Network Firewallaws-network-firewallAmazon Route 53 Resolver DNS Firewallaws-route53-dns-firewallSecurity groupaws-security-groupMicrosoft Entra Internet Accessazure-entra-internet-accessAzure Firewallazure-firewallNetwork Security Groupazure-network-security-groupNetwork security perimeterazure-network-security-perimeterCloudflare DNS Firewallcloudflare-dns-firewallCloudflare Gatewaycloudflare-gatewayCloudflare Network Firewallcloudflare-network-firewallGeneric firewallfirewallFirewall appliancefirewall-applianceFortinet FortiGatefortigateMikroTik RouterOSmikrotik-routerosnftablesnftablesOPNsenseopnsensePalo Alto Networks NGFWpalo-alto-ngfwpfSensepfsenseSnortsnortSuricatasuricataVyOSvyosDigitalOcean Cloud Firewallsdigitalocean-cloud-firewallCloud IDSgoogle-cloud-idsCloud NGFWgoogle-cloud-ngfwSecure Web Proxygoogle-secure-web-proxyIBM Cloud Hardware Firewallibm-firewallVPC Security Groupibm-security-groupNetwork Firewalloci-network-firewallNetwork Security Groupoci-network-security-groupSecurity Listoci-security-listSecurity Groupoutscale-security-group
# yaml-language-server: $schema=../../schema/component.schema.json # Kubernetes NetworkPolicy: an allow list for pod-to-pod and pod-to-world traffic at OSI layer 3 # or 4. Per "Network Policies" pods are non-isolated until a policy selects them and accept traffic # from any source; once selected, only connections matching a rule are allowed, reply traffic is # implicitly allowed, and policies are additive so evaluation order does not matter. If policyTypes # is omitted, Ingress is always set and Egress only when egress rules exist. Enforcement requires a # network plugin that supports NetworkPolicy; without one the object has no effect. schemaVersion: "1" type: "component" id: "k8s-network-policy" kind: "firewall" provider: "k8s" docs: "https://kubernetes.io/docs/concepts/services-networking/network-policies/" aliases: ["netpol"] defaults: managed: false defaultAction: "deny" stateful: true properties: policyScope: type: "enum" values: ["ingress", "egress", "ingress-egress"] default: "ingress" pluginEnforcementRequired: type: "boolean" default: true additiveRules: type: "boolean" default: true