kubernetes-operator

kubernetes-operator is a skill for Claude Code, Codex from Morningstar202604/awesome-skillkit. It costs 165 tokens per session (4,969 once invoked), scanned A, original, Apache-2.0.

A guide for building Kubernetes Operators, which are controllers that continually make a cluster match the configuration declared in a custom resource.

In plain words
What is it for?
Use it to design custom resources, reconcile loops, status conditions, finalizers, RBAC, leader election, and webhook validation.
Why use it?
It focuses on common controller problems such as missing cleanup steps, stalled retries, incorrect status, and overly broad permissions. This helps catch design and implementation gaps before deployment.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to design custom resources, reconcile loops, status conditions, finalizers, RBAC, leader election, and webhook validation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/morningstar202604/awesome-skillkit/kubernetes-operator
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 Morningstar202604/awesome-skillkit --skill kubernetes-operator
Clone the repo
git clone --depth 1 https://github.com/Morningstar202604/awesome-skillkit

Made for: Claude Code, Codex.

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-operator

README.md
[![agentmods](https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/kubernetes-operator/github.svg)](https://agentmods.dev/skills/morningstar202604/awesome-skillkit/kubernetes-operator)
Your own site
<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/kubernetes-operator"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/kubernetes-operator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kubernetes-operator

Your own site · 80×15
<a href="https://agentmods.dev/skills/morningstar202604/awesome-skillkit/kubernetes-operator"><img src="https://agentmods.dev/badge/skills/morningstar202604/awesome-skillkit/kubernetes-operator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 165 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,969 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00165 $0.04969
Opus 5.5 $0.00066 $0.01988
Sonnet 5.5 $0.00033 $0.00994
Haiku 4.5 $0.00016 $0.00497

Measured 2mo ago against content hash 141b3bb9e42d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

kubernetes-operator scanned grade A with 0 findings 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 2mo ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/crd_validator.py, scripts/operator_capability_audit.py, scripts/reconcile_lint.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

expert-teams/teams/fullstack-web-team/skills/kubernetes-operator/SKILL.md · 345 lines

How it starts

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

Kubernetes Operator

构建调谐正确的 Operator。多数 operator 问题不是 Kubernetes 的问题,而是调谐循环的问题:finalizer 缺失、阻塞调用、瞬态错误不 requeue、status 漂移、RBAC 过度授权。本技能用确定性手段在代码进集群之前拦住它们。

何时使用

  • 构建新的 Kubernetes Operator(CRD 的控制器)
  • 审查现有 operator 的能力等级缺口
  • 审计 CRD spec 的 status/conditions/finalizer 正确性
  • 选型框架(controller-runtime / kubebuilder / operator-sdk / metacontroller / KOPF)
  • 设计 Custom Resource 的 API 面
  • 加固 RBAC、leader 选举或 webhook 校验

何时不使用

  • 纯 Helm chart 打包 → 用 helm-chart-builder
  • 常规 kubectl 操作 / 蓝绿发布 → 用 senior-devops
  • 泛用 k8s 安全态势 → 用 cloud-security
  • "我只是想跑个负载" —— 那是 Deployment / Job,不是 operator

输入清单

开工前一次性收集。缺输入时用这句话向用户问一次:"要审计/构建 Operator,请一次性提供:operator 仓库路径、CRD YAML 路径、controller Go 源文件路径、目标语言/框架(如已定)。"

输入 必需 说明
Operator 仓库根目录 是(audit/bootstrap) 包含 config/、controllers/、api/ 的目录 → --operator-dir
CRD YAML 文件或目录 是(CRD 检查) 用户 operator 仓库中的 config/crd/myapp.yaml → --crd
Go controller 源码 是(reconcile lint) 如 controllers/myapp_controller.go → --controller
Group/Version/Kind 是(新 operator) 如 apps.example.com/v1alpha1,kind MyApp
语言/框架约束 用于框架选型 Go / Python / Java / 多语言;见工具选型全景

前置自检

python3 --version        # 预期:Python ≥ 3.8。3 个工具全部仅依赖标准库。
ls scripts/crd_validator.py scripts/reconcile_lint.py scripts/operator_capability_audit.py
                         # 预期:3 个文件全部列出。
  • Python 缺失或版本过旧 → 安装 Python ≥ 3.8,然后停止。
  • 脚本文件缺失 → 目录不对;cd 到本技能目录重新检查,然后停止。
  • 审计现有 operator?再跑 ls <operator-dir>/config/crd/ <operator-dir>/controllers/ —— 预期:至少一个 CRD YAML 和一个控制器 .go 文件。缺失 → 与用户确认仓库布局后再继续(不要猜路径)。

核心原则:operator 是调谐循环,不是脚本

observe(actual) → desired = read(spec) → diff(actual, desired) → act → update(status)
                                                                          ↓
                                                                   requeue / done

失败的 operator 通常是这样:

  1. 把 reconcile 当命令式脚本(先做这个,再做这个)而不是声明式(幂等地让 actual=desired)
  2. 瞬态失败不 requeue
  3. 不用 finalizer,留下孤儿资源
  4. 改 spec 而不是改 status
  5. 不用 status 子资源(status 更新会触发 spec 调谐 → 死循环)
  6. reconcile 内阻塞(长 HTTP 调用、锁)
  7. 忘了 leader 选举 → 多副本部署时脑裂

Read the full file on GitHub · 345 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. 2mo ago Changed · -1 lines · +4 tokens per session 141b3bb9e42d
  2. 2mo ago Changed · +1 lines · +161 tokens per session f9819f748505
  3. 2mo ago Changed 4c970f4fcc5a
  4. 2mo ago Changed · +98 lines · -133 tokens per session 09e85432f389
  5. 3mo ago First seen · 247 lines · 133 tokens per session scan A 26db19c74530

Subscribe to this mod's changes

kubernetes-operator is a skill published in the GitHub repository Morningstar202604/awesome-skillkit (0 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 165 tokens to every session and 4,969 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

kubernetes-operator compared with skills from other repositories

kubernetes-operator next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
kubernetes-operatorMorningstar202604/awesome-skillkitSkill02mo agoApache-2.0A165Claude Code, Codex
docker-managementNousResearch/hermes-agentSkill267ktodayMITA14Claude Code, Codex
deployment-patternsaffaan-m/ECCSkill313k7d agoMITA41Claude Code, Kiro
docker-patternsaffaan-m/ECCSkill313k7d agoMITA40Claude Code, Kiro
sandbox-imageslangchain-ai/open-sweSkill11ktodayMITA55Claude Code, Codex
deploy-docker-composeomnigent-ai/omnigentSkill12ktodayApache-2.0A84Claude Code, Codex
langbot-deploylangbot-app/LangBotSkill19ktodayApache-2.0B104Claude Code, Codex