wshobson avatar

K8s Security Policies

Implements the security trifecta for Kubernetes clusters: NetworkPolicies for network segmentation, RBAC for least-privilege access, and Pod Security Standards for container restrictions. Generates manifests for default-deny network policies, service account bindings, and OPA Gatekeeper constraints. Also covers Istio service mesh security with mTLS and authorization policies. Use this when you need to lock down a cluster for production, meet compliance requirements like CIS benchmarks, or implement multi-tenant security. The examples are comprehensive but you'll need to adapt the specific rules to your application architecture and security requirements.

skills.sh installs
15.1K
GitHub stars
42.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add wshobson/agents --skill k8s-security-policies --agent claude-code

Installs into .claude/skills of the current project.

Files

Kubernetes Security Policies

Comprehensive guide for implementing NetworkPolicy, PodSecurityPolicy, RBAC, and Pod Security Standards in Kubernetes.

Purpose

Implement defense-in-depth security for Kubernetes clusters using network policies, pod security standards, and RBAC.

When to Use This Skill

  • Implement network segmentation
  • Configure pod security standards
  • Set up RBAC for least-privilege access
  • Create security policies for compliance
  • Implement admission control
  • Secure multi-tenant clusters

Pod Security Standards

1. Privileged (Unrestricted)

apiVersion: v1
kind: Namespace
metadata:
  name: privileged-ns
  labels:
    pod-security.kubernetes.io/enforce: privileged
    pod-security.kubernetes.io/audit: privileged
    pod-security.kubernetes.io/warn: privileged

2. Baseline (Minimally restrictive)

apiVersion: v1
kind: Namespace
metadata:
  name: baseline-ns
  labels:
    pod-security.kubernetes.io/enforce: baseline
    pod-security.kubernetes.io/audit: baseline
    pod-security.kubernetes.io/warn: baseline

3. Restricted (Most restrictive)

Sponsors

Details

Repository
github.com/wshobson/agents
Categories
Security, DevOps & CI/CD

More from wshobson/agents

All 174

Recommended

More Security
1affaan-m avatarsecurity-reviewaffaan-m/eccUse this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment/sensitive features. Provid7.6Kskills.sh installs
2affaan-m avatarspringboot-securityaffaan-m/eccSpring Security best practices for authn/authz, validation, CSRF, secrets, headers, rate limiting, and dependency security in Java Spring Boot services.6Kskills.sh installs
3trailofbits avatarcosmos-vulnerability-scannertrailofbits/skillsScans Cosmos SDK blockchain modules and CosmWasm contracts for consensus-critical vulnerabilities — chain halts, fund loss, state divergence. 25 core + 16 IBC +5.7Kskills.sh installs
4affaan-m avatarllm-trading-agent-securityaffaan-m/eccSecurity patterns for autonomous trading agents with wallet or transaction authority. Covers prompt injection, spend limits, pre-send simulation, circuit breake5.6Kskills.sh installs
5dpearson2699 avatarauthenticationdpearson2699/swift-ios-skillsImplement iOS authentication flows with AuthenticationServices and LocalAuthentication. Use when building Sign in with Apple, passkey/WebAuthn registration or s4.1Kskills.sh installs
6yaklang avatarmacos-security-bypassyaklang/hack-skillsmacOS security bypass playbook. Use when targeting macOS endpoints and need to bypass TCC, Gatekeeper, SIP, sandbox, code signing, or entitlement-based protecti3.7Kskills.sh installs