network-policies

Solid

Design and implement Kubernetes NetworkPolicy and Cilium network policies for namespace isolation and service-to-service access control.

DevOps & Infrastructure 14 stars 3 forks Updated 3 days ago MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
39
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Skill: Network Policies > **Expertise:** K8s NetworkPolicy + Cilium policy design for multi-tenant namespace isolation and zero-trust traffic control. ## When to load When isolating a new namespace, allowing specific service-to-service communication, debugging traffic being blocked, or auditing inter-namespace access. ## Standard Policy Set (apply to every new namespace) ```yaml # 1. Default deny-all (must be first) apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: default-deny-all namespace: my-app spec: podSelector: {} # matches ALL pods in namespace policyTypes: [Ingress, Egress] --- # 2. Allow DNS (required for all pods) apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: allow-dns-egress namespace: my-app spec: podSelector: {} policyTypes: [Egress] egress: - ports: - port: 53 protocol: UDP - port: 53 protocol: TCP --- # 3. Allow ingress from ingress controller apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: allow-ingress-controller namespace: my-app spec: podSelector: matchLabels: app: my-service policyTypes: [Ingress] ingress: - from: - namespaceSelector: matchLabels: kubernetes.io/metadata.name: ingress-nginx ports: - port: 8080 ``` ## Service-to-Service Policy ```yaml # Allow order-service (in orders ns) to call payment-service (in payments ns) apiVersion: netw...

Details

Author
sawrus
Repository
sawrus/agent-guides
Created
3 months ago
Last Updated
3 days ago
Language
Shell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

DevOps & Infrastructure Featured

implementing-network-policies-for-kubernetes

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 plu

12,642 Updated today
mukul975
DevOps & Infrastructure Listed

k8s-security-policies

Implement Kubernetes security policies including NetworkPolicy, PodSecurityPolicy, and RBAC for production-grade security. Use when securing Kubernetes clusters, implementing network isolation, or enforcing pod security standards.

335 Updated today
aiskillstore
DevOps & Infrastructure Listed

k8s-security-policies

Implement Kubernetes security policies including NetworkPolicy, PodSecurityPolicy, and RBAC for production-grade security. Use when securing Kubernetes clusters, implementing network isolation, or enforcing pod security standards.

21 Updated 5 days ago
HermeticOrmus
DevOps & Infrastructure Solid

k8s-security-policies

Implement Kubernetes security policies including NetworkPolicy, PodSecurityPolicy, and RBAC for production-grade security. Use when securing Kubernetes clusters, implementing network isolation, or enforcing pod security standards.

36,166 Updated yesterday
wshobson
DevOps & Infrastructure Listed

k8s-security-policies

Implement Kubernetes security policies including NetworkPolicy, PodSecurityPolicy, and RBAC for production-grade security. Use when securing Kubernetes clusters, implementing network isolation, or ...

42 Updated 2 months ago
diegosouzapw