kubernetes-security

kubernetes-security is a skill for Claude Code from arjunprabhulal/devops-skills. It costs 115 tokens per session (1,419 once invoked), scanned A, original, MIT.

A guide to securing Kubernetes clusters and the application containers they run.

In plain words
What is it for?
Use it to configure least-privilege access, pod security rules, admission checks, container security settings, secret protection, trusted images, and service-account behavior.
Why use it?
It reduces the damage caused by overly broad permissions, containers running as root, exposed secrets, or compromised workloads.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the devops-skills plugin — 56 skills shipped together

Good fit Use it to configure least-privilege access, pod security rules, admission checks, container…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/arjunprabhulal/devops-skills/kubernetes-security
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add arjunprabhulal/devops-skills --skill kubernetes-security
Clone the repo
git clone --depth 1 https://github.com/arjunprabhulal/devops-skills

Made for: Claude Code.

Or install devops-skills, the plugin that ships this one along with the rest of its 56 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kubernetes-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/arjunprabhulal/devops-skills/kubernetes-security.svg)](https://agentmods.dev/skills/arjunprabhulal/devops-skills/kubernetes-security)
Your own site
<a href="https://agentmods.dev/skills/arjunprabhulal/devops-skills/kubernetes-security"><img src="https://agentmods.dev/badge/skills/arjunprabhulal/devops-skills/kubernetes-security.svg" alt="Measured on agentmods" height="20"></a>
Per session 115 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,419 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00115 $0.01419
Opus 5 $0.00057 $0.00709
Sonnet 5 $0.00023 $0.00284
Haiku 4.5 $0.00012 $0.00142

Measured 6d ago against content hash ff6ece426005, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

kubernetes-security scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootlowPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

or an admission controller like Kyverno/OPA Gatekeeper turns "we ask people not to run as root" into

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/kubernetes/kubernetes-security/SKILL.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Kubernetes Security

Kubernetes ships permissive by default: any pod gets a service-account token mountable for API access, RBAC starts wide open until you constrain it, and nothing stops a container from running as root unless you tell it not to. Security here is subtractive work — removing default permissions the platform hands out for convenience, not adding a product on top.

Assume every pod will eventually be compromised and ask what that gets the attacker. The right default is the least the workload needs to function, enforced at admission, not caught in review.

1. Scope RBAC to the verb and resource, not the namespace

The most common RBAC mistake is binding ClusterRole: edit or cluster-admin because a narrower role was fiddly to write. A Role/ClusterRole should list exact verbs (get, list, watch, create) against exact resources — "can read Pods in this namespace" is a different, much smaller grant than "edit everything."

  • Prefer Role+RoleBinding over ClusterRole+ClusterRoleBinding unless the permission genuinely spans namespaces — cluster-scoped grants are the ones that turn one compromised namespace into a cluster-wide incident.
  • Audit with kubectl auth can-i --list --as=<sa> rather than reading YAML and hoping — it's the ground truth the API server actually enforces.
  • Service accounts, not user credentials, should hold workload permissions; humans get scoped roles through your identity provider, see iam-access-management.

Done when: kubectl auth can-i --list for the workload's service account shows nothing beyond what it demonstrably calls.

2. Turn off the automount you didn't ask for

Every pod gets a service-account token mounted by default, whether or not it ever calls the Kubernetes API. That token is exactly what an attacker inside a compromised container reaches for first — disabling automount removes a capability most workloads never needed.

spec:
  automountServiceAccountToken: false   # set at pod or ServiceAccount level

Read the full file on GitHub · 111 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 111 lines · 115 tokens per session scan A ff6ece426005

Subscribe to this mod's changes

kubernetes-security is a skill published in the GitHub repository arjunprabhulal/devops-skills (3 stars, last pushed 12d ago), licensed MIT. It adds 115 tokens to every session and 1,419 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

gke-app-onboarding

Manages GKE application onboarding, covering containerization, deployment manifests, and migration. Use when onboarding or deploying an application to GKE for the first time, or containerizing an app for GKE. Don't use for general GKE cluster administration or upgrades (use gke-basics or gke-upgrades instead).

google/skills · 70 tokens

build-mcpb

This skill should be used when the user wants to "package an MCP server", "bundle an MCP", "make an MCPB", "ship a local MCP server", "distribute a local MCP", discusses ".mcpb files", mentions bundling a Node or Python runtime with their MCP server, or needs an MCP server that interacts with the local filesystem…

anthropics/claude-plugins-official · 98 tokens

google-mobile-ads-android-migrate-to-next-gen

Migrates Android applications from the old, legacy Google Mobile Ads (GMA) SDK (com.google.android.gms:play-services-ads) to the new GMA Next-Gen SDK (com.google.android.libraries.ads.mobile.sdk:ads-mobile-sdk). Provides comprehensive mapping tables for imports, classes, and method signatures to help determine…

google/skills · 105 tokens

agent-platform-tuning

Agent Platform Model Tuning. Use when you need to fine-tune open models or Gemini models using Agent Platform infrastructure. Don't use for model training outside Agent Platform, model deployment to endpoints (use agent-platform-deploy), or managing serving endpoints (use agent-platform-endpoint-management).

google/skills · 64 tokens

google-cloud-solution-guided-gke-ai-migration

Guides the migration of existing AI workloads (Cloud Run, Gemini API, Gemini Enterprise Agent Platform) to self-hosted GKE inference using gcloud and kubectl. Use when the user has an existing AI inference workload (on Cloud Run, the Gemini API, Gemini Enterprise Agent Platform, or a custom VM) and wants to move it to…

google/skills · 157 tokens

agent-platform-deploy

Deploy open models or custom weights from Model Garden to Agent Platform endpoints, check the status of an in-progress deployment operation, or clean up resources by undeploying models and deleting endpoints. Use when asked to actively deploy a model, list the Model Garden CATALOG of available models, check if a…

google/skills · 193 tokens