kubernetes network k8snetpol harden

DevOps Community

Skill notes

Overview

Kubernetes NetworkPolicies provide pod-level network segmentation by defining ingress and egress rules that control traffic flow between pods, namespaces, and external endpoints. Combined with CNI plugins like Calico or Cilium, network policies enforce zero-trust microsegmentation to prevent lateral movement within the cluster.

When to Use

When deploying or configuring implementing network policies for kubernetes capabilities in your environment When establishing security controls aligned to compliance requirements When building or improving security architecture for this domain When conducting security assessments that require this implementation

Prerequisites

Kubernetes cluster with NetworkPolicy-supporting CNI (Calico, Cilium, Antrea) kubectl configured with admin access Understanding of pod labels and selectors

References

Kubernetes Network Policies Calico Network Policies Cilium Network Policies Network Policy Editor Source: DCx7C5/ai-marketplace — distributed by TomeVault.

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
DevOps
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@tomevault-io · no license declared
Token usage
Lean
Setup complexity
Plug-and-play
External API key
Not required
Operating systems
Unspecified (assume cross-platform)
Runtime requirements
No explicit requirements detected
Detected file/system behavior
  • Read-only
Network behavior
External requests
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Step 1: Default Deny All Traffic

Step 1: Default Deny All Traffic

02
Step 2: Allow DNS Egress (Required for Service Discovery)

Step 2: Allow DNS Egress (Required for Service Discovery)

03
Step 3: Application-Specific Policies

Step 3: Application-Specific Policies

04
Step 4: Cross-Namespace Policies

Step 4: Cross-Namespace Policies

05
Step 5: Egress Restrictions

Step 5: Egress Restrictions

06
Step 6: Block Cloud Metadata Access

Step 6: Block Cloud Metadata Access

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.