kubernetes-operator
यह क्या करती है
यह Kubernetes operators के डिज़ाइन और जाँच में मार्गदर्शन करती है। Operators ऐसे प्रोग्राम हैं जो cluster में custom resources प्रबंधित करते हैं। यह ऐसे controller बनाने या उनका ऑडिट करने वाले इंजीनियरों के लिए है।
कब इस्तेमाल करें
- ✓जब आप किसी custom resource के लिए नया Kubernetes operator बना रहे हों।
- ✓जब आप चाहें कि मौजूदा operator की समीक्षा हो, ताकि लापता finalizers, status drift या अनुमति समस्याएँ मिलें।
- ✓जब आपको kubebuilder या operator-sdk जैसा framework चुनना हो।
Skill का लिंक
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/kubernetes-operator/skills/kubernetes-operator/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं एक Kubernetes operator बनाना चाहता हूँ जो हमारे database backups प्रबंधित करे। controller लिखने से पहले इसका डिज़ाइन बनाने में मेरी मदद कीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट resource definition की पुष्टि करता है, आम बग्स के लिए control loop की जाँच करता है, और helper scripts से operator की परिपक्वता का स्तर आँकता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Kubernetes Operator
Build operators that reconcile correctly. Most operator bugs are not Kubernetes bugs — they are reconcile-loop bugs: missing finalizers, blocking calls, no requeue on transient errors, status drift, RBAC over-grants. This skill catches them deterministically before they reach a cluster.
When to use
- Building a new Kubernetes Operator (controller for a CRD)
- Reviewing an existing operator for capability-level gaps
- Auditing a CRD spec for status/conditions/finalizer correctness
- Choosing a framework (controller-runtime / kubebuilder / operator-sdk / metacontroller / KOPF)
- Designing the API surface of a Custom Resource
- Hardening RBAC, leader election, or webhook validation
When NOT to use
- Plain Helm chart packaging → use
helm-chart-builder - Standard kubectl operations / blue-green deploys → use
senior-devops - General k8s security posture → use
cloud-security - "I want to run a workload" — that's a Deployment / Job, not an operator
Core principle: an operator is a reconcile loop, not a script
observe(actual) → desired = read(spec) → diff(actual, desired) → act → update(status)
↓
requeue / done
Operators that fail are the ones that:
- Treat reconcile as imperative (do this, then this, then this) instead of declarative (make actual=desired, idempotently)
- Don't requeue transient failures
- Don't use finalizers, leaving orphan resources
- Mutate spec instead of status
- Don't use the status subresource (status updates trigger spec reconciles → loop)
- Block in reconcile (long HTTP calls, locks)
- Forget leader election → split-brain on multi-replica deploys
The 3 tools below catch each of these.
Quick start
SKILL=engineering/kubernetes-operator/skills/kubernetes-operator
# Validate a CRD design
python "$SKILL/scripts/crd_validator.py" --crd config/crd/myapp.yaml
# Lint a Go reconcile function
python "$SKILL/scripts/reconcile_lint.py" --controller controllers/myapp_controller.go
# Score against OperatorHub Capability Levels (1-5)
python "$SKILL/scripts/operator_capability_audit.py" --operator-dir .
The 3 Python tools
All stdlib-only. Run with --help.
crd_validator.py
Validates a CRD YAML against operator-pattern best practices.
python scripts/crd_validator.py --crd config/crd/myapp.yaml
python scripts/crd_validator.py --crd config/crd/ --format json
Checks:
spec.versions[*].subresources.statusis set (status subresource)spec.scopeisNamespaced(notCluster) unless explicitly justified- Singular and listKind defined
spec.versions[*].schema.openAPIV3Schemahas type definitions (nox-kubernetes-preserve-unknown-fields: trueat top level)- A version is marked
served: trueANDstorage: true - Conditions array is in the schema (allows
metav1.Conditions) - Printer columns include
AgeandStatus/Phase
reconcile_lint.py
Lints a Go controller reconcile function for anti-patterns.
python scripts/reconcile_lint.py --controller controllers/myapp_controller.go
Checks (regex-based heuristics):
- Returns are
(ctrl.Result, error)shape - Errors trigger a non-zero requeue (
return ctrl.Result{Requeue: true}, err) client.Update()on the spec object is flagged (controllers should update only status)time.Sleepinside reconcile is flagged (useRequeueAfter)- HTTP calls without context cancellation are flagged
- Missing
deferafter a finalizer add - No
IsConditionTrue/SetConditioncalls when conditions present in CRD - Reconcile function exceeds 80 lines (extract subroutines)
operator_capability_audit.py
Scores an operator against OperatorHub's 5 Capability Levels.
python scripts/operator_capability_audit.py --operator-dir .
Levels:
- L1 — Basic Install: CRD defined, controller deploys it
- L2 — Seamless Upgrades: PDBs, conversion webhooks, version skew strategy
- L3 — Full Lifecycle: backups, restores, failure recovery
- L4 — Deep Insights: metrics endpoint, Prometheus rules, alerts
- L5 — Auto Pilot: auto-scaling, auto-tuning, anomaly detection
Reports current level + concrete next steps to advance one level.
Tooling landscape
Pick a framework based on language and complexity. See references/tooling_landscape.md.
| Framework | Language | Best for
अक्सर पूछे जाने वाले सवाल
operator क्या है?
यह एक ऐसा प्रोग्राम है जो Kubernetes resource देखता है और असली सिस्टम को उस resource के विवरण से मेल में रखता है।
क्या यह सामान्य ऐप चलाने के लिए है?
नहीं। सामान्य ऐप Deployment या Job के रूप में चलता है, और यह skill custom controllers बनाने के लिए है।
यह कौन से आम बग्स खोजती है?
लापता finalizers, blocking calls, अस्थायी त्रुटियों पर retry का न होना, status drift और बहुत व्यापक अनुमतियाँ।
जानकारी
लेखक का मूल विवरण
Use when building a Kubernetes operator or CRD (controller-runtime, kubebuilder, operator-sdk, KOPF), before writing the controller. Validates CRDs with crd_validator.py, lints reconcile loops with reconcile_lint.py and scores OperatorHub capability level.
लोकप्रियता
- GitHub स्टार
- 29k
- रैंकिंग में स्थान
- #9564
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
agent-launcher-orchestrator
29kआपके एजेंट को एक साफ़ लक्ष्य से शुरू करके, अपने खाते में Claude मैनेज्ड एजेंट की योजना बनाने, बनाने, जांचने और शेड्यूल करने में चरण-दर-चरण मदद करती है।
grade-iterate
29kआपके एजेंट को किसी मैनेज्ड AI एजेंट के काम को रूब्रिक से आंकने और तय संख्या के दौरों में सुधारने देती है, ताकि वह कभी अनंत चक्र में न फंसे।
interview
29kआपके एजेंट को AI एजेंट के विचार पर आपसे इंटरव्यू लेने और कुछ भी लॉन्च होने से पहले आपके जवाबों को सरल निर्माण योजना में बदलने देती है।
run-without-you
29kआपके एजेंट को मैनेज्ड AI एजेंट शेड्यूल पर या किसी घटना पर चलाने में मदद करती है, लॉन्च से पहले cron समय की जांच के साथ।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।