kubernetes-operator
БесплатноЗапускает вложенные скриптыНе проверенDesign, build, and operate Kubernetes operators. Use when extending Kubernetes with a custom controller, choosing a framework, designing CRDs, implementing…
от borghei★ 1 250 звёзд на GitHubОб этом скилле
Kubernetes Operator
End-to-end Kubernetes operator design and construction. Covers the operator pattern (control loops for stateful workloads), CRD design (schema, validation, conversion, status), the reconciliation loop (idempotency, convergence, level- vs edge-triggered), framework selection (controller-runtime / Kubebuilder / operator-SDK / metacontroller), and operational concerns (finalizers, leader election, RBAC scoping, status subresource, observability). Targets Go-based operators (the dominant ecosystem) with notes on alternatives (KOPF, JOSDK, kube-rs).
Core Capabilities
- Decide whether to write an operator — operator vs Helm vs GitOps vs admission webhook vs Crossplane, and when NOT to build one at all.
- CRD design — spec/status separation, OpenAPI v3 structural schemas, CEL cross-field validation, versioning, conversion webhooks, status subresource, printer columns, scale subresource.
- Reconciliation loops — idempotent, level-triggered, converging control loops; phase machines vs always-converge; owner references and garbage collection.
- Controller-runtime patterns (Go) — skeleton reconcilers, server-side apply, finalizers, leader election, watches/predicates/indexers, error classification, envtest.
- Framework selection — controller-runtime, Kubebuilder, operator-SDK, Metacontroller, KOPF, JOSDK, kube-rs.
- Operational hardening — finalizers, leader election, tightened RBAC, status conditions/observedGeneration, Prometheus metrics + structured logging.
- Anti-pattern audit — 24-entry catalog with severities, detection heuristics, and fixes for production-readiness review.
When to Use
| Situation | Skill applies |
|---|---|
| Building a new operator for an internal platform primitive | Yes — start with the operator pattern decision |
| Auditing an existing operator for production-readiness | Yes — use anti-patterns + scripts/reconciliation_audit.py |
| Designing CRDs for a custom resource | Yes — use CRD design + scripts/crd_validator.py |
| Deciding "operator vs Helm chart vs plain manifests" | Yes — use the decision matrix |
| Scaffolding a new operator project | Yes — scripts/operator_scaffold.py |
| Debugging a controller that "isn't reconciling" | Yes — use reconciliation troubleshooting |
| Just running someone else's operator (Postgres, Kafka, etc.) | Partially — useful for understanding what it does and how to monitor it |
Clarify First
Before scaffolding or auditing, settle the inputs below. When one is missing or vague and would change the result, ask about it; when it wouldn't, use a sensible default and say which one you used.
- Task: scaffold an operator, validate a CRD, or audit a controller (selects
operator_scaffold.pyvscrd_validator.pyvsreconciliation_audit.py). - Resource identity: for scaffolding: the operator name, API group, and kind (sets
--name/--group/--kind); for validation/audit: the CRD YAML or controller path (the input the scripts read). - Framework: controller-runtime/Kubebuilder/operator-SDK (Go), or KOPF/JOSDK/kube-rs (drives the scaffold patterns).
Ask about the two or three inputs that matter most for this request, not the whole list. If the user wants a result straight away, produce it and state your assumptions at the top.
Workflow
- Decide whether to build one. Use the decision matrix in references/operator-decisions-and-workflows.md; a Helm chart, GitOps or an admission policy is often enough.
- Design the CRD (spec/status split, structural schema, CEL rules, status subresource, printer columns) and check it with
crd_validator.py. - Scaffold with
operator_scaffold.py, thengo mod tidy(resolves current controller-runtime and k8s.io versions) andmake generate manifests build(controller-gen writes DeepCopy methods, CRDs and RBAC). Kubebuilder (kubebuilder init/create api) is the fuller alternative when you want its project layout, webhooks and test harness. - Implement the reconciler: idempotent, level-triggered, owner references on children, finalizers for external resources,
observedGenerationand conditions in status. - Audit with
reconciliation_audit.pyagainst the controller source and CRDs; fix every critical finding. - Verify with envtest or a kind cluster: create, update and delete the resource; kill the controller mid-reconcile and confirm it converges; run two replicas with leader election on.
Quick Start
python3 scripts/crd_validator.py --schema assets/sample_crd_weak.yaml # no status subresource, untyped spec (exit 1)
python3 scripts/reconciliation_audit.py --controller-path assets --crd assets/sample_crd_weak.yaml # missing finalizer/ownerRef, wildcard RBAC ... (exit 1)
python3 scripts/operator_scaffold.py --name db-operator --group example.com --kind Database --out "$(mktemp -d)/db-
Установить kubernetes-operator в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл kubernetes-operator?
Design, build, and operate Kubernetes operators. Use when extending Kubernetes with a custom controller, choosing a framework, designing CRDs, implementing reconciliation loops, or auditing an operator for anti-patterns.
Как установить скилл kubernetes-operator?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл kubernetes-operator запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic