k8s-security-policies

Generate and enforce Kubernetes NetworkPolicy, PodSecurityPolicy, and RBAC security policies.

1|Updated Apr 27, 2026
One-click install
npx skills add https://github.com/haxlys/skills --skill k8s-security-policies-haxlys
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s-security-policies
Source: https://github.com/haxlys/skills/tree/main/vendored/wshobson-agents/plugins/kubernetes-operations/skills/k8s-security-policies
Command: npx skills add https://github.com/haxlys/skills --skill k8s-security-policies-haxlys

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Implement robust Kubernetes security governance by providing guidance and templates to enforce NetworkPolicy, PodSecurityPolicy, and RBAC across production clusters, reducing surface area and risk.

Core Features & Use Cases

  • NetworkPolicy templates for default deny, allowed ingress/egress, and cross-namespace rules.
  • Pod Security Standards guidance to enforce baseline, restricted, and privileged profiles.
  • RBAC patterns and best practices to implement least-privilege access controls.
  • Reference materials and templates stored in the assets and references folders to accelerate secure deployments.
  • Compliance-oriented playbooks for audit-ready configurations in multi-namespace environments.

Quick Start

Use the provided policy templates to implement baseline Kubernetes security in your production namespace.

Frequently Asked Questions about k8s-security-policies

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

FAQPage Schema
How do I implement Kubernetes NetworkPolicy for multi-namespace isolation?

Kubernetes NetworkPolicy templates enforce default deny rules and allowed ingress/egress traffic to establish baseline isolation across multi-namespace environments. Cross-namespace rules restrict communication paths between specific workloads for compliant cluster networking.

What are Pod Security Standards baseline and restricted profiles?

Pod Security Standards define baseline, restricted, and privileged profiles to enforce container runtime controls. Guidance templates apply these profiles to prevent privileged escalations and standardize pod security admission across production deployments.

How do I configure RBAC patterns for least-privilege access in Kubernetes?

RBAC patterns implement least-privilege access controls by defining granular Role and ClusterRole bindings. Best practice templates configure auditable permissions to restrict service accounts and users from unauthorized resource modifications.

Can I use these policy templates for compliance-focused production deployments?

Policy templates validate configurations against security benchmarks for compliance-focused production deployments. Reference materials and playbooks generate audit-ready manifests that establish baseline isolation and enforce required controls across namespaces.

What is the best way to validate Kubernetes security policies against benchmarks?

Validating Kubernetes security policies against benchmarks requires applying reference patterns to manifest configurations. Templates check baseline isolation, RBAC least privilege, and Pod Security Standards adherence to reduce surface area and ensure auditable access controls.