k8s-security-policies

Implement Kubernetes NetworkPolicy, PodSecurityPolicy, and RBAC security controls.

1|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/AngelP17/factoryops-console --skill k8s-security-policies-angelp17
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s-security-policies
Source: https://github.com/AngelP17/factoryops-console/tree/main/factoryops-console/.agent/skills/k8s-security-policies
Command: npx skills add https://github.com/AngelP17/factoryops-console --skill k8s-security-policies-angelp17

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes assets (resource) and references (resource) components.

What problem does it solve?

This skill enables teams to codify Kubernetes security controls by implementing NetworkPolicy, PodSecurityPolicy and RBAC to enforce isolation, least-privilege access, and compliant configurations across clusters.

Core Features & Use Cases

  • NetworkPolicy templates to isolate workloads and control traffic.
  • Pod Security Standards guidance and best practices to harden container execution.
  • RBAC patterns and Role/ClusterRole bindings for least-privilege access across namespaces.
  • Admission control guidance (OPA Gatekeeper/Kyverno) to enforce policies in production.

Quick Start

Apply the provided security manifests to a test namespace and validate network isolation, pod security, and access controls using kubectl and policy tools.

Frequently Asked Questions about k8s-security-policies

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce network isolation and least-privilege access in Kubernetes clusters?

NetworkPolicy, RBAC, and Pod Security Standards enforce network isolation and least-privilege access by controlling traffic between pods, restricting user permissions to specific resources, and hardening container execution contexts. This Skill provides templates and patterns to implement these controls across namespaces and multi-tenant environments.

What's the difference between NetworkPolicy, PodSecurityPolicy, and RBAC in Kubernetes?

NetworkPolicy controls pod-to-pod traffic flow, PodSecurityPolicy (now Pod Security Standards) restricts container capabilities and privilege levels, and RBAC governs who can perform actions on which resources. Each layer addresses a distinct security domain: network, runtime, and access control.

How do I enforce Kubernetes security policies automatically at admission time?

Admission controllers like OPA Gatekeeper and Kyverno intercept and validate resource requests before they enter the cluster, enforcing security policies without manual intervention. This Skill covers admission control guidance and policy templates to prevent non-compliant workloads from running in production.

Can I use admission control with OPA Gatekeeper or Kyverno to enforce security policies?

Yes, both OPA Gatekeeper and Kyverno are admission control engines that enforce policy-driven security. This Skill provides reference manifests and patterns to deploy and configure either tool to validate NetworkPolicy, Pod Security Standards, and RBAC compliance across your cluster.

What prerequisites do I need to implement Kubernetes security policies in production?

You need a running Kubernetes cluster, kubectl access, understanding of RBAC concepts, and familiarity with network policies and pod security standards. This Skill provides ready-to-apply manifests and templates to codify these controls without requiring deep policy engine expertise.

Why should I codify Kubernetes security controls instead of applying them manually?

Codifying security policies ensures consistent, repeatable enforcement across all clusters and namespaces, reduces configuration drift, enables version control and auditing, and supports multi-tenant isolation at scale. Policy-as-code makes security measurable and maintainable in production environments.