kubernetes-security

Enforce Kubernetes security hardening for deployments with RBAC, pod security, and network policies.

187|20|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/TheBushidoCollective/han --skill kubernetes-security
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: kubernetes-security
Source: https://github.com/TheBushidoCollective/han/tree/main/jutsu/jutsu-kubernetes/skills/kubernetes-security
Command: npx skills add https://github.com/TheBushidoCollective/han --skill kubernetes-security

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides security best practices for Kubernetes deployments, including RBAC, pod security, and network policies.

Core Features & Use Cases

  • Pod Security: Run as non-root, read-only root filesystem, dropped capabilities.
  • RBAC: Role, RoleBinding, and service accounts configurations.
  • Network Policies: Control traffic between pods.

Quick Start

Apply a non-root security context and a basic network policy to limit pod ingress/egress.

Frequently Asked Questions about kubernetes-security

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

FAQPage Schema
How do I enforce RBAC in Kubernetes to control who can access resources?

RBAC (Role-Based Access Control) in Kubernetes uses Roles, RoleBindings, and service accounts to define permissions. Create a Role with specific API verbs and resources, bind it to a service account via RoleBinding, and assign that account to pods to enforce least-privilege access across your cluster.

What's the best way to harden pod security in Kubernetes deployments?

Pod security hardening enforces runAsNonRoot to prevent root execution, sets readOnlyRootFilesystem to block writes, and drops unsafe Linux capabilities. These controls combined with Pod Security Standards restrict the attack surface and prevent privilege escalation in containerized workloads.

How do I implement network policies to control pod-to-pod traffic in Kubernetes?

Network policies define ingress and egress rules for pod communication by matching labels and specifying allowed sources or destinations. Apply them to restrict lateral movement, isolate workloads, and enforce zero-trust network segmentation within your cluster.

Do I need to manage secrets differently in Kubernetes for security compliance?

Kubernetes security requires encrypted or externally managed secrets instead of hardcoded values in manifests. Enable encryption at rest, use external secret managers, and avoid storing sensitive data in pod definitions to meet compliance and prevent credential exposure.

How do I ensure container images are secure in a Kubernetes deployment?

Enforce image security by requiring explicit tags (no latest), setting imagePullPolicy to Always, running security scans on images, and validating they run as non-root with dropped capabilities and read-only filesystems before deployment.

What resource controls should I apply to prevent Kubernetes cluster abuse?

Set resource limits and quotas on CPU, memory, and storage to prevent pod sprawl and denial-of-service attacks. Combined with Pod Security Standards, these controls enforce fair resource allocation and stop misconfigured or malicious workloads from consuming cluster capacity.