k8s-security-policies

Implement Kubernetes NetworkPolicy, PodSecurityPolicy, and RBAC security policies.

Updated Dec 23, 2025
One-click install
npx skills add https://github.com/drgaciw/academic-compliance-hub-glm --skill k8s-security-policies-drgaciw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s-security-policies
Source: https://github.com/drgaciw/academic-compliance-hub-glm/tree/main/agents/plugins/kubernetes-operations/skills/k8s-security-policies
Command: npx skills add https://github.com/drgaciw/academic-compliance-hub-glm --skill k8s-security-policies-drgaciw

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the critical need for robust security in Kubernetes environments by providing comprehensive guidance and configurations for implementing essential security policies.

Core Features & Use Cases

  • Pod Security Standards: Enforce security best practices for pods (Privileged, Baseline, Restricted).
  • Network Policies: Implement network segmentation and control traffic flow (Default Deny, Allow Specific Traffic).
  • RBAC Configuration: Define granular access controls using Roles and ClusterRoles.
  • Use Case: Secure a production Kubernetes cluster by implementing a 'Restricted' Pod Security Standard, denying all ingress/egress traffic by default, and granting specific read-only access to a monitoring service account.

Quick Start

Apply the 'restricted-ns' Pod Security Standard to the '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 enforce Kubernetes Pod Security Standards in a production namespace?

You can enforce Kubernetes Pod Security Standards by applying the 'restricted-ns' policy to a production namespace. This restricts pod capabilities, enforcing security contexts and baseline privileges to secure your cluster workloads.

What is the best way to implement default deny network policies for Kubernetes?

Implementing default deny network policies involves configuring a Kubernetes NetworkPolicy to block all ingress and egress traffic by default. You then layer specific allow rules to control traffic flow and achieve network isolation.

How does RBAC configuration work for securing Kubernetes clusters?

RBAC secures Kubernetes clusters by defining granular access controls using Roles and ClusterRoles. You bind these to specific service accounts to restrict permissions, such as granting read-only access to monitoring components within a namespace.

When do I need a Restricted Pod Security Standard versus a Baseline one?

You need a Restricted Pod Security Standard for production workloads requiring strict isolation, while Baseline is for general use preventing known privilege escalations. Restricted enforces the most rigorous pod security contexts to block vulnerabilities.

Do I need to understand Kubernetes networking to use NetworkPolicy isolation?

Yes, implementing NetworkPolicy isolation requires understanding Kubernetes networking and pod security contexts. You need this knowledge to properly configure default deny rules and define specific traffic flows for network segmentation.