MCPInstall

kubernetes-security-policies

Kubernetes security policies, RBAC, and Pod Security Standards for hardened cluster deployments. Use when implementing cluster security, defining network policies, or enforcing security compliance in Kubernetes environments.

Installs
104
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/nickcrew/claude-cortex --skill kubernetes-security-policies
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads kubernetes-security-policies automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Kubernetes Security Policies

Comprehensive guidance for implementing security policies in Kubernetes clusters, covering Pod Security Standards, Network Policies, RBAC, Security Contexts, admission control, secrets management, and runtime security for production-grade hardened deployments.

When to Use This Skill

  • Implementing Pod Security Standards (PSS/PSA) across namespaces
  • Designing and enforcing Network Policies for micro-segmentation
  • Configuring RBAC with least-privilege access control
  • Setting Security Contexts for container hardening
  • Deploying admission controllers (OPA/Gatekeeper, Kyverno)
  • Managing secrets and sensitive data securely
  • Implementing image security and vulnerability scanning
  • Enforcing runtime security policies and threat detection
  • Meeting compliance requirements (CIS, NIST, PCI-DSS, SOC2)
  • Conducting security audits and hardening assessments

Core Security Concepts

Pod Security Standards (PSS): Three progressive security levels enforced via Pod Security Admission (PSA):

  • Privileged: Unrestricted (default)
  • Baseline: Prevents known privilege escalations
  • Restricted: Pod hardening best practices (production recommended)

Network Policies: Zero-trust micro-segmentation controlling pod-to-pod and pod-to-external traffic using label selectors and namespace isolation.

RBAC (Role-Based Access Control): Least-privilege access control using ServiceAccounts, Roles, RoleBindings for namespace-scoped permissions, and ClusterRoles for cluster-wide access.

Security Contexts: Container and pod-level security settings including user/group IDs, capabilities, seccomp profiles, and filesystem restrictions.

Admission Control: Policy enforcement at API admission time using OPA Gatekeeper (Rego) or Kyverno (YAML) to validate, mutate, or reject resources.

Secrets Management: External secret storage integration (Vault, AWS Secrets Manager, Sealed Secrets) instead of native Kubernetes secrets.

Image Security: Vulnerability scanning, signature verification, digest-based immutability, and private registry authentication.

Quick Reference

TaskLoad reference
Pod Security Standards (PSS/PSA)skills/kubernetes-security-policies/references/pod-security-standards.md
Network Policiesskills/kubernetes-security-policies/references/network-policies.md
RBAC (Roles, ServiceAccounts)skills/kubernetes-security-policies/references/rbac.md
Security Contexts (capabilities, seccomp)skills/kubernetes-security-policies/references/security-contexts.md
Admission Control (OPA, Kyverno)skills/kubernetes-security-policies/references/admission-control.md
Secrets Management (Vault, ESO)skills/kubernetes-security-policies/references/secrets-management.md
Image Security (scanning, signing)skills/kubernetes-security-policies/references/image-security.md
Best Practices & Complianceskills/kubernetes-security-policies/references/best-practices.md

Security Implementation Workflow

Phase 1: Baseline Assessment

  1. Audit current security posture with kube-bench or kubescape
  2. Identify gaps against CIS Kubernetes Benchmark
  3. Document compliance requirements (PCI-DSS, NIST, SOC2)

Phase 2: Pod Security Standards

  1. Enable PSA audit mode on all namespaces
  2. Identify violations using kubectl get pods -A --show-labels
  3. Remediate workloads to meet baseline/restricted standards
  4. Progressively enforce: dev (warn) → staging (baseline) → prod (restricted)

Phase 3: Network Segmentation

  1. Deploy default-deny NetworkPolicy to all namespaces
  2. Create explicit allow rules for required traffic flows
  3. Implement database isolation policies
  4. Add monitoring/observability exceptions

Phase 4: Access Control (RBAC)

  1. Audit existing RBAC with kubectl auth can-i --list
  2. Create dedicated ServiceAccounts per application
  3. Define least-privilege Roles with specific resource/verb restrictions
  4. Disable automountServiceAccountToken by default
  5. Minimize ClusterRole usage

Phase 5: Admission Control

  1. Choose policy engine: OPA Gatekeeper (Rego) or Kyverno (YAML)
  2. Implement validation policies: require labels, resource limits, non-root
  3. Add mutation policies: inject security contexts, sidecar containers
  4. Enforce image policies: disallow latest tag, require signatures

Phase 6: Secrets Management

  1. Deploy External Secrets Operator or Vault integration
  2. Migrate native Secrets to external secret stores
  3. Enable encryption at rest for etcd
  4. Implement secret rotation policies

Phase 7: Image Security

  1. Integrate vulnerability scanning in CI/CD (Trivy, Snyk)
  2. Implement image signing with Sigstore/Cosign
  3. Enforce signature verification via admission control
  4. Use immutable image digests instead of tags

Phase 8: Runtime Security

  1. Deploy Falco for runtime threat detection
  2. Enable Kubernetes audit logging
  3. Configure alerts for security events
  4. Implement intrusion detection policies

Common Mistakes

Pod Security:

  • Running containers as root (always set runAsNonRoot: true)
  • Using privileged containers (avoid unless absolutely necessary)
  • Writable root filesystem (set readOnlyRootFilesystem: true)
  • Missing resource limits (required for restricted PSS)

Network Policies:

  • No default-deny policy (unrestricted pod-to-pod traffic)
  • Overly permissive egress rules (allow all external traffic)
  • Forgetting DNS egress (pods can't resolve names)
  • Missing monitoring/observability exceptions

RBAC:

  • Overly broad ClusterRole permissions (violates least privilege)
  • Sharing ServiceAccounts across applications
  • Using * verbs or resources in Roles
  • Not auditing RBAC permissions regularly

Secrets:

  • Committing secrets to Git repositories
  • Using environment variables instead of mounted files
  • Relying on base64 encoding as encryption
  • No secret rotation policy

Admission Control:

  • Enforcing policies without audit phase first
  • Blocking kube-system namespace accidentally
  • No policy testing in staging environment
  • Missing exemptions for system components

Images:

  • Using latest tag (not immutable, breaks reproducibility)
  • No vulnerability scanning in CI/CD
  • Unsigned images in production
  • Large base images (use distroless or Alpine)

Resources

FAQ

What does the kubernetes-security-policies skill do?

Kubernetes security policies, RBAC, and Pod Security Standards for hardened cluster deployments. Use when implementing cluster security, defining network policies, or enforcing security compliance in Kubernetes environments.

How do I install kubernetes-security-policies?

Run npx skills add https://github.com/nickcrew/claude-cortex --skill kubernetes-security-policies in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/kubernetes-security-policies/ (personal) or .claude/skills/kubernetes-security-policies/ (project).

Which AI agents can use kubernetes-security-policies?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is kubernetes-security-policies safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains kubernetes-security-policies?

It is published by nickcrew in nickcrew/claude-cortex. It has 104 recorded installs.

More from nickcrew/claude-cortex

View all →

react-performance-optimization

nickcrew/claude-cortex

React performance optimization patterns using memoization, code splitting, and efficient rendering strategies. Use when optimizing slow React applications, reducing bundle size, or improving user experience with large datasets.

Frontend & Design1.9K installs

owasp-top-10

nickcrew/claude-cortex

OWASP Top 10 security vulnerabilities with detection and remediation patterns. Use when conducting security audits, implementing secure coding practices, or reviewing code for common security vulnerabilities.

Security758 installs

ui-design-aesthetics

nickcrew/claude-cortex

Generates high-quality, non-generic UI designs with a focus on performance, progressive disclosure, and distinctive aesthetics.

Frontend & Design358 installs

threat-modeling-techniques

nickcrew/claude-cortex

Threat modeling methodologies using STRIDE, attack trees, and risk assessment for proactive security analysis. Use when designing secure systems, conducting security reviews, or identifying potential attack vectors in applications.

Security357 installs

token-efficiency

nickcrew/claude-cortex

Compressed communication using symbols and abbreviations. Use when context is limited or brevity is needed.

228 installs

helm-chart-patterns

nickcrew/claude-cortex

Helm chart development patterns for packaging and deploying Kubernetes applications. Use when creating reusable Helm charts, managing multi-environment deployments, or building application catalogs for Kubernetes.

DevOps & Cloud179 installs

Popular security skills

View category →

azure-compliance

microsoft/azure-skills

Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.

OfficialSecurity567K installs

minimal-run-and-audit

lllllllama/rigorpilot-skills

Rigor Run skill for README-first deep learning repo reproduction. Use when the task is specifically to capture or normalize evidence from the selected smoke test or documented inference or evaluation command and write standardized reprooutputs/ files, including patch notes when repository files changed. Do not use for training execution, initial repo intake, generic environment setup, paper lookup, target selection, hidden scientific-meaning changes, or end-to-end orchestration by itself.

Security477.4K installs

seo-audit

coreyhaines31/marketingskills

When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," "indexing issues," "stuck on page 2," "striking distance keywords," "title tag rewrite," "low CTR," "local SEO," "Google Business Profile," or "map pack." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema. For AI search optimization, see ai-seo.

Security238.7K installs

firebase-security-rules-auditor

firebase/agent-skills

Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource exhaustion, type safety, size limits, and hasOnly ownership checks. Use when auditing/reviewing rules, running red-team rule assessments, or scoring against auditor checklists. Don't use for Firebase CLI (login, deploy), Auth, Crashlytics, Remote Config, or database queries.

OfficialSecurity139.1K installs

audit

pbakaus/impeccable

Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.

Security81.9K installs

competitors

coreyhaines31/marketingskills

When the user wants to create competitor comparison or alternative pages for SEO and buyer-facing use. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'competitor teardown,' 'audit our competitor pages,' 'are our comparison pages out of date,' or 'competitive asset audit.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For auditing existing claims (not researching competitors from scratch, which is competitor-profiling; not technical SEO on these pages, which is seo-audit), use the asset audit here. For internal battle cards and sales-specific competitor docs, see sales-enablement.

Security79.3K installs