[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M76NBCXTHNKBKM9CEXWBNGGS":3,"skill-same:01M76NBCXTHNKBKM9CEXWBNGGS":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":14,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M76NBCXTHNKBKM9CEXWBNGGS","kubernetes-operator",null,"Use when building a Kubernetes Operator — custom controllers that reconcile CRD state. Triggers on \"build an operator\", \"CRD design\", \"reconcile loop\", \"controller-runtime\", \"kubebuilder\", \"operator-sdk\", \"metacontroller\", \"KOPF\", \"operator capability levels\", or \"custom resource\". Ships CRD validator, reconcile-loop linter, and OperatorHub capability auditor (all stdlib Python), 4 references on the operator pattern + CRD design + reconcile patterns + tooling landscape, and a \u002Foperator-audit slash command. NOT a generic k8s skill — specifically the Operator pattern.","SamuelChien\u002Fmega-skills-collection","SamuelChien","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4652114?v=4","01M74KK34WVHA0P5ZYSJRDDFMG","Samuel Chien","01M74KK35FQN1N9VZ9EPTH3P2S",0,"MIT","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fskills-kubernetes-operator\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: kubernetes-operator\ndescription: Use when building a Kubernetes Operator — custom controllers that reconcile CRD state. Triggers on \"build an operator\", \"CRD design\", \"reconcile loop\", \"controller-runtime\", \"kubebuilder\", \"operator-sdk\", \"metacontroller\", \"KOPF\", \"operator capability levels\", or \"custom resource\". Ships CRD validator, reconcile-loop linter, and OperatorHub capability auditor (all stdlib Python), 4 references on the operator pattern + CRD design + reconcile patterns + tooling landscape, and a \u002Foperator-audit slash command. NOT a generic k8s skill — specifically the Operator pattern.\ncontext: fork\nversion: 2.4.0\nauthor: claude-code-skills\nlicense: MIT\ntags: [kubernetes, operator, crd, controller-runtime, kubebuilder, operator-sdk, metacontroller, kopf, reconcile, devops]\ncompatible_tools: [claude-code, codex-cli, cursor, antigravity, opencode, gemini-cli]\n---\n\n# Kubernetes Operator\n\nBuild 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.\n\n## When to use\n\n- Building a new Kubernetes Operator (controller for a CRD)\n- Reviewing an existing operator for capability-level gaps\n- Auditing a CRD spec for status\u002Fconditions\u002Ffinalizer correctness\n- Choosing a framework (controller-runtime \u002F kubebuilder \u002F operator-sdk \u002F metacontroller \u002F KOPF)\n- Designing the API surface of a Custom Resource\n- Hardening RBAC, leader election, or webhook validation\n\n## When NOT to use\n\n- Plain Helm chart packaging → use `helm-chart-builder`\n- Standard kubectl operations \u002F blue-green deploys → use `senior-devops`\n- General k8s security posture → use `cloud-security`\n- \"I want to run a workload\" — that's a Deployment \u002F Job, not an operator\n\n## Core principle: an operator is a reconcile loop, not a script\n\n```\nobserve(actual) → desired = read(spec) → diff(actual, desired) → act → update(status)\n                                                                          ↓\n                                                                   requeue \u002F done\n```\n\nOperators that fail are the ones that:\n1. Treat reconcile as imperative (do this, then this, then this) instead of declarative (make actual=desired, idempotently)\n2. Don't requeue transient failures\n3. Don't use finalizers, leaving orphan resources\n4. Mutate spec instead of status\n5. Don't use the status subresource (status updates trigger spec reconciles → loop)\n6. Block in reconcile (long HTTP calls, locks)\n7. Forget leader election → split-brain on multi-replica deploys\n\nThe 3 tools below catch each of these.\n\n## Quick start\n\n```bash\nSKILL=engineering\u002Fkubernetes-operator\u002Fskills\u002Fkubernetes-operator\n\n# Validate a CRD design\npython \"$SKILL\u002Fscripts\u002Fcrd_validator.py\" --crd config\u002Fcrd\u002Fmyapp.yaml\n\n# Lint a Go reconcile function\npython \"$SKILL\u002Fscripts\u002Freconcile_lint.py\" --controller controllers\u002Fmyapp_controller.go\n\n# Score against OperatorHub Capability Levels (1-5)\npython \"$SKILL\u002Fscripts\u002Foperator_capability_audit.py\" --operator-dir .\n```\n\n## The 3 Python tools\n\nAll stdlib-only. Run with `--help`.\n\n### `crd_validator.py`\n\nValidates a CRD YAML against operator-pattern best practices.\n\n```bash\npython scripts\u002Fcrd_validator.py --crd config\u002Fcrd\u002Fmyapp.yaml\npython scripts\u002Fcrd_validator.py --crd config\u002Fcrd\u002F --format json\n```\n\n**Checks:**\n- `spec.versions[*].subresources.status` is set (status subresource)\n- `spec.scope` is `Namespaced` (not `Cluster`) unless explicitly justified\n- Singular and listKind defined\n- `spec.versions[*].schema.openAPIV3Schema` has type definitions (no `x-kubernetes-preserve-unknown-fields: true` at top level)\n- A version is marked `served: true` AND `storage: true`\n- Conditions array is in the schema (allows `metav1.Conditions`)\n- Printer columns include `Age` and `Status`\u002F`Phase`\n\n### `reconcile_lint.py`\n\nLints a Go controller reconcile function for anti-patterns.\n\n```bash\npython scripts\u002Freconcile_lint.py --controller controllers\u002Fmyapp_controller.go\n```\n\n**Checks (regex-based heuristics):**\n- Returns are `(ctrl.Result, error)` shape\n- Errors trigger a non-zero requeue (`return ctrl.Result{Requeue: true}, err`)\n- `client.Update()` on the spec object is flagged (controllers should update only status)\n- `time.Sleep` inside reconcile is flagged (use `RequeueAfter`)\n- HTTP calls without context cancellation are flagged\n- Missing `defer` after a finalizer add\n- No `IsConditionTrue` \u002F `SetCondition` calls when conditions present in CRD\n- Reconcile function exceeds 80 lines (extract subroutines)\n\n### `operator_capability_audit.py`\n\nScores an operator against OperatorHub's 5 Capability Levels.\n\n```bash\npython scripts\u002Foperator_capability_audit.py --operator-dir .\n```\n\n**Levels:**\n- **L1 — Basic Install:** CRD defined, controller deploys it\n- **L2 — Seamless Upgrades:** PDBs, conversion webhooks, version skew strategy\n- **L3 — Full Lifecycle:** backups, restores, failure recovery\n- **L4 — Deep Insights:** metrics endpoint, Prometheus rules, alerts\n- **L5 — Auto Pilot:** auto-scaling, auto-tuning, anomaly detection\n\nReports current level + concrete next steps to advance one level.\n\n## Tooling landscape\n\nPick a framework based on language and complexity. See `references\u002Ftooling_landscape.md`.\n\n| Framework | Language | Best for | Maintenance |\n|---|---|---|---|\n| **controller-runtime** | Go | Production-grade, low-level control | Active (sig-api-machinery) |\n| **kubebuilder** | Go | Standard scaffolding, opinionated | Active (Kubernetes SIGs) |\n| **operator-sdk** | Go \u002F Helm \u002F Ansible | OpenShift \u002F mixed-paradigm teams | Active (Red Hat) |\n| **metacontroller** | Any (webhook-based) | Polyglot teams, avoiding Go | Less active |\n| **KOPF** | Python | Python shops, async-first | Active (community) |\n| **java-operator-sdk** | Java | JVM shops | Active (Red Hat \u002F Java SIG) |\n\nDecision rules:\n- New operator + Go shop → kubebuilder\n- New operator + Python shop → KOPF\n- New operator + can't pick a language → metacontroller\n- OpenShift target → operator-sdk\n\n## CRD design principles\n\nSee `references\u002Fcrd_design.md` for full detail. Quick rules:\n\n1. **status is the source of truth for the controller's view of the world.** Spec is what the user wants; status is what the controller observed.\n2. **Use the status subresource.** Without it, status updates re-trigger reconcile (loop).\n3. **Use Conditions.** `Ready`, `Reconciling`, `Degraded`. Each carries a reason and message.\n4. **Add finalizers.** Without finalizers, deletion races the controller and orphans external resources.\n5. **Version your CRD from day 1.** `v1alpha1` → `v1beta1` → `v1`. Plan a conversion webhook.\n6. **Validate via OpenAPI v3 schema.** Don't rely on the controller for validation that should fail at admission.\n7. **Use `additionalPrinterColumns` for `kubectl get`.** Show `Age`, `Phase`, `Ready` at minimum.\n8. **Namespace your CRDs unless they manage cluster-scoped resources.**\n\n## Reconcile loop principles\n\nSee `references\u002Freconcile_loop.md` for full detail. Quick rules:\n\n1. **Idempotent.** Reconciling the same state twice → same result, zero side effects.\n2. **Read once, decide, act.** Don't observe the world repeatedly during reconcile.\n3. **Update status, not spec.** Spec belongs to the user.\n4. **Return errors that requeue.** Use `ctrl.Result{RequeueAfter: ...}` for known transient cases.\n5. **Never block.** No `time.Sleep`. No long HTTP calls without context.\n6. **Use the cache.** Read via the controller's cached client; only escape the cache for a specific reason.\n7. **Leader-elect when running >1 replica.** Otherwise enable single-replica mode.\n8. **Set OwnerReferences.** Cascading deletion is the operator pattern's free gift.\n\n## Workflows\n\n### Workflow 1: Bootstrap a new operator (Go + kubebuilder)\n\n```\n1. Pick a Group\u002FVersion\u002FKind: e.g., apps.example.com\u002Fv1alpha1, kind=MyApp\n2. kubebuilder init --domain example.com --repo github.com\u002Forg\u002Fmyapp-operator\n3. kubebuilder create api --group apps --version v1alpha1 --kind MyApp\n4. Run crd_validator.py on config\u002Fcrd\u002Fbases\u002Fapps.example.com_myapps.yaml\n   → Fix every WARN before writing controller code\n5. Implement the reconcile function (Karpathy principle 2: simplest correct version first)\n6. Run reconcile_lint.py on controllers\u002Fmyapp_controller.go\n7. Run operator_capability_audit.py --operator-dir . — confirm L1\n8. Test in a kind cluster: kubectl apply -f config\u002Fsamples\u002F\n9. Add status conditions; aim for L2 in the same PR\n```\n\n### Workflow 2: Audit an existing operator\n\n```\n1. Run operator_capability_audit.py --operator-dir \u003Cpath>\n2. Run crd_validator.py --crd config\u002Fcrd\u002F\n3. Run reconcile_lint.py --controller controllers\u002F\n4. Triage findings:\n   - FAIL → block release; fix before next deploy\n   - WARN → file an issue; fix in next 30 days\n5. Document current capability level in README; commit\n6. Plan one capability level advancement per quarter\n```\n\n### Workflow 3: Choose a framework\n\n```\n1. Identify primary language constraint (team skill)\n2. Identify deployment target (vanilla k8s vs OpenShift)\n3. Identify operator complexity (single CRD vs multi-CRD vs cluster-wide)\n4. Cross-reference with references\u002Ftooling_landscape.md\n5. Build a 1-week proof-of-concept before committing\n```\n\n## References\n\n- `references\u002Foperator_pattern.md` — what an operator IS, when to use vs alternatives\n- `references\u002Fcrd_design.md` — CRD design principles, versioning, conversion webhooks\n- `references\u002Freconcile_loop.md` — reconcile patterns, error handling, idempotency\n- `references\u002Ftooling_landscape.md` — framework comparison + decision tree\n\n## Slash command\n\n`\u002Foperator-audit` — Run all 3 tools on an operator repo and produce a markdown report.\n\n## Asset templates\n\n- `assets\u002Fcrd_template.yaml` — CRD with status subresource, conditions, finalizer hint, printer columns\n- `assets\u002Freconcile_skeleton.go` — Go controller reconcile function with idempotency, conditions, finalizers, requeue patterns\n\n## Anti-patterns\n\n- **`time.Sleep(30 * time.Second)` inside reconcile** — block other reconciles. Use `RequeueAfter`.\n- **`r.Client.Update(ctx, obj)` to set status** — use `r.Status().Update(ctx, obj)` instead.\n- **No leader election + 2+ replicas** — split-brain.\n- **No finalizer** — external resources orphan on deletion.\n- **CRD without status subresource** — status updates trigger spec reconciles (infinite loop).\n- **Reconcile function > 200 lines** — extract reconcileXxx subroutines per condition.\n- **`x-kubernetes-preserve-unknown-fields: true` on spec root** — defeats validation.\n- **Imperative reconcile** — \"if creating, do A; if updating, do B; if deleting, do C\". Wrong shape. Reconcile = make actual=desired, regardless of how we got here.\n\n## Verifiable success\n\nA team using this skill should achieve:\n\n- 100% of new CRDs pass `crd_validator.py` before merge\n- All reconcile functions pass `reconcile_lint.py` strict mode\n- Operators reach OperatorHub Capability Level 3 (Full Lifecycle) before public release\n- Mean time to fix a reconcile bug: \u003C1 day (no infinite loops in production)\n","# Kubernetes Operator\n\nBuild 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.\n\n## When to use\n\n- Building a new Kubernetes Operator (controller for a CRD)\n- Reviewing an existing operator for capability-level gaps\n- Auditing a CRD spec for status\u002Fconditions\u002Ffinalizer correctness\n- Choosing a framework (controller-runtime \u002F kubebuilder \u002F operator-sdk \u002F metacontroller \u002F KOPF)\n- Designing the API surface of a Custom Resource\n- Hardening RBAC, leader election, or webhook validation\n\n## When NOT to use\n\n- Plain Helm chart packaging → use `helm-chart-builder`\n- Standard kubectl operations \u002F blue-green deploys → use `senior-devops`\n- General k8s security posture → use `cloud-security`\n- \"I want to run a workload\" — that's a Deployment \u002F Job, not an operator\n\n## Core principle: an operator is a reconcile loop, not a script\n\n```\nobserve(actual) → desired = read(spec) → diff(actual, desired) → act → update(status)\n                                                                          ↓\n                                                                   requeue \u002F done\n```\n\nOperators that fail are the ones that:\n1. Treat reconcile as imperative (do this, then this, then this) instead of declarative (make actual=desired, idempotently)\n2. Don't requeue transient failures\n3. Don't use finalizers, leaving orphan resources\n4. Mutate spec instead of status\n5. Don't use the status subresource (status updates trigger spec reconciles → loop)\n6. Block in reconcile (long HTTP calls, locks)\n7. Forget leader election → split-brain on multi-replica deploys\n\nThe 3 tools below catch each of these.\n\n## Quick start\n\n```bash\nSKILL=engineering\u002Fkubernetes-operator\u002Fskills\u002Fkubernetes-operator\n\n# Validate a CRD design\npython \"$SKILL\u002Fscripts\u002Fcrd_validator.py\" --crd config\u002Fcrd\u002Fmyapp.yaml\n\n# Lint a Go reconcile function\npython \"$SKILL\u002Fscripts\u002Freconcile_lint.py\" --controller controllers\u002Fmyapp_controller.go\n\n# Score against OperatorHub Capability Levels (1-5)\npython \"$SKILL\u002Fscripts\u002Foperator_capability_audit.py\" --operator-dir .\n```\n\n## The 3 Python tools\n\nAll stdlib-only. Run with `--help`.\n\n### `crd_validator.py`\n\nValidates a CRD YAML against operator-pattern best practices.\n\n```bash\npython scripts\u002Fcrd_validator.py --crd config\u002Fcrd\u002Fmyapp.yaml\npython scripts\u002Fcrd_validator.py --crd config\u002Fcrd\u002F --format json\n```\n\n**Checks:**\n- `spec.versions[*].subresources.status` is set (status subresource)\n- `spec.scope` is `Namespaced` (not `Cluster`) unless explicitly justified\n- Singular and listKind defined\n- `spec.versions[*].schema.openAPIV3Schema` has type definitions (no `x-kubernetes-preserve-unknown-fields: true` at top level)\n- A version is marked `served: true` AND `storage: true`\n- Conditions array is in the schema (allows `metav1.Conditions`)\n- Printer columns include `Age` and `Status`\u002F`Phase`\n\n### `reconcile_lint.py`\n\nLints a Go controller reconcile function for anti-patterns.\n\n```bash\npython scripts\u002Freconcile_lint.py --controller controllers\u002Fmyapp_controller.go\n```\n\n**Checks (regex-based heuristics):**\n- Returns are `(ctrl.Result, error)` shape\n- Errors trigger a non-zero requeue (`return ctrl.Result{Requeue: true}, err`)\n- `client.Update()` on the spec object is flagged (controllers should update only status)\n- `time.Sleep` inside reconcile is flagged (use `RequeueAfter`)\n- HTTP calls without context cancellation are flagged\n- Missing `defer` after a finalizer add\n- No `IsConditionTrue` \u002F `SetCondition` calls when conditions present in CRD\n- Reconcile function exceeds 80 lines (extract subroutines)\n\n### `operator_capability_audit.py`\n\nScores an operator against OperatorHub's 5 Capability Levels.\n\n```bash\npython scripts\u002Foperator_capability_audit.py --operator-dir .\n```\n\n**Levels:**\n- **L1 — Basic Install:** CRD defined, controller deploys it\n- **L2 — Seamless Upgrades:** PDBs, conversion webhooks, version skew strategy\n- **L3 — Full Lifecycle:** backups, restores, failure recovery\n- **L4 — Deep Insights:** metrics endpoint, Prometheus rules, alerts\n- **L5 — Auto Pilot:** auto-scaling, auto-tuning, anomaly detection\n\nReports current level + concrete next steps to advance one level.\n\n## Tooling landscape\n\nPick a framework based on language and complexity. See `references\u002Ftooling_landscape.md`.\n\n| Framework | Language | Best for | Maintenance |\n|---|---|---|---|\n| **controller-runtime** | Go | Production-grade, low-level control | Active (sig-api-machinery) |\n| **kubebuilder** | Go | Standard scaffolding, opinionated | Active (Kubernetes SIGs) |\n| **operator-sdk** | Go \u002F Helm \u002F Ansible | OpenShift \u002F mixed-paradigm teams | Active (Red Hat) |\n| **metacontroller** | Any (webhook-based) | Polyglot teams, avoiding Go | Less active |\n| **KOPF** | Python | Python shops, async-first | Active (community) |\n| **java-operator-sdk** | Java | JVM shops | Active (Red Hat \u002F Java SIG) |\n\nDecision rules:\n- New operator + Go shop → kubebuilder\n- New operator + Python shop → KOPF\n- New operator + can't pick a language → metacontroller\n- OpenShift target → operator-sdk\n\n## CRD design principles\n\nSee `references\u002Fcrd_design.md` for full detail. Quick rules:\n\n1. **status is the source of truth for the controller's view of the world.** Spec is what the user wants; status is what the controller observed.\n2. **Use the status subresource.** Without it, status updates re-trigger reconcile (loop).\n3. **Use Conditions.** `Ready`, `Reconciling`, `Degraded`. Each carries a reason and message.\n4. **Add finalizers.** Without finalizers, deletion races the controller and orphans external resources.\n5. **Version your CRD from day 1.** `v1alpha1` → `v1beta1` → `v1`. Plan a conversion webhook.\n6. **Validate via OpenAPI v3 schema.** Don't rely on the controller for validation that should fail at admission.\n7. **Use `additionalPrinterColumns` for `kubectl get`.** Show `Age`, `Phase`, `Ready` at minimum.\n8. **Namespace your CRDs unless they manage cluster-scoped resources.**\n\n## Reconcile loop principles\n\nSee `references\u002Freconcile_loop.md` for full detail. Quick rules:\n\n1. **Idempotent.** Reconciling the same state twice → same result, zero side effects.\n2. **Read once, decide, act.** Don't observe the world repeatedly during reconcile.\n3. **Update status, not spec.** Spec belongs to the user.\n4. **Return errors that requeue.** Use `ctrl.Result{RequeueAfter: ...}` for known transient cases.\n5. **Never block.** No `time.Sleep`. No long HTTP calls without context.\n6. **Use the cache.** Read via the controller's cached client; only escape the cache for a specific reason.\n7. **Leader-elect when running >1 replica.** Otherwise enable single-replica mode.\n8. **Set OwnerReferences.** Cascading deletion is the operator pattern's free gift.\n\n## Workflows\n\n### Workflow 1: Bootstrap a new operator (Go + kubebuilder)\n\n```\n1. Pick a Group\u002FVersion\u002FKind: e.g., apps.example.com\u002Fv1alpha1, kind=MyApp\n2. kubebuilder init --domain example.com --repo github.com\u002Forg\u002Fmyapp-operator\n3. kubebuilder create api --group apps --version v1alpha1 --kind MyApp\n4. Run crd_validator.py on config\u002Fcrd\u002Fbases\u002Fapps.example.com_myapps.yaml\n   → Fix every WARN before writing controller code\n5. Implement the reconcile function (Karpathy principle 2: simplest correct version first)\n6. Run reconcile_lint.py on controllers\u002Fmyapp_controller.go\n7. Run operator_capability_audit.py --operator-dir . — confirm L1\n8. Test in a kind cluster: kubectl apply -f config\u002Fsamples\u002F\n9. Add status conditions; aim for L2 in the same PR\n```\n\n### Workflow 2: Audit an existing operator\n\n```\n1. Run operator_capability_audit.py --operator-dir \u003Cpath>\n2. Run crd_validator.py --crd config\u002Fcrd\u002F\n3. Run reconcile_lint.py --controller controllers\u002F\n4. Triage findings:\n   - FAIL → block release; fix before next deploy\n   - WARN → file an issue; fix in next 30 days\n5. Document current capability level in README; commit\n6. Plan one capability level advancement per quarter\n```\n\n### Workflow 3: Choose a framework\n\n```\n1. Identify primary language constraint (team skill)\n2. Identify deployment target (vanilla k8s vs OpenShift)\n3. Identify operator complexity (single CRD vs multi-CRD vs cluster-wide)\n4. Cross-reference with references\u002Ftooling_landscape.md\n5. Build a 1-week proof-of-concept before committing\n```\n\n## References\n\n- `references\u002Foperator_pattern.md` — what an operator IS, when to use vs alternatives\n- `references\u002Fcrd_design.md` — CRD design principles, versioning, conversion webhooks\n- `references\u002Freconcile_loop.md` — reconcile patterns, error handling, idempotency\n- `references\u002Ftooling_landscape.md` — framework comparison + decision tree\n\n## Slash command\n\n`\u002Foperator-audit` — Run all 3 tools on an operator repo and produce a markdown report.\n\n## Asset templates\n\n- `assets\u002Fcrd_template.yaml` — CRD with status subresource, conditions, finalizer hint, printer columns\n- `assets\u002Freconcile_skeleton.go` — Go controller reconcile function with idempotency, conditions, finalizers, requeue patterns\n\n## Anti-patterns\n\n- **`time.Sleep(30 * time.Second)` inside reconcile** — block other reconciles. Use `RequeueAfter`.\n- **`r.Client.Update(ctx, obj)` to set status** — use `r.Status().Update(ctx, obj)` instead.\n- **No leader election + 2+ replicas** — split-brain.\n- **No finalizer** — external resources orphan on deletion.\n- **CRD without status subresource** — status updates trigger spec reconciles (infinite loop).\n- **Reconcile function > 200 lines** — extract reconcileXxx subroutines per condition.\n- **`x-kubernetes-preserve-unknown-fields: true` on spec root** — defeats validation.\n- **Imperative reconcile** — \"if creating, do A; if updating, do B; if deleting, do C\". Wrong shape. Reconcile = make actual=desired, regardless of how we got here.\n\n## Verifiable success\n\nA team using this skill should achieve:\n\n- 100% of new CRDs pass `crd_validator.py` before merge\n- All reconcile functions pass `reconcile_lint.py` strict mode\n- Operators reach OperatorHub Capability Level 3 (Full Lifecycle) before public release\n- Mean time to fix a reconcile bug: \u003C1 day (no infinite loops in production)\n",{"name":5,"tags":24,"author":35,"context":36,"license":15,"version":37,"description":7,"compatible_tools":38},[25,26,27,28,29,30,31,32,33,34],"kubernetes","operator","crd","controller-runtime","kubebuilder","operator-sdk","metacontroller","kopf","reconcile","devops","claude-code-skills","fork","2.4.0",[39,40,41,42,43,44],"claude-code","codex-cli","cursor","antigravity","opencode","gemini-cli","main","c2b1fdccc779e99ac814e55fb69ca8d71215dd0f","skills-kubernetes-operator","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection","https:\u002F\u002Fgithub.com\u002FSamuelChien","http:\u002F\u002Fsamuelchien.com\u002F","2026-05-26 08:27:14",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add SamuelChien\u002Fmega-skills-collection --skill kubernetes-operator",{"tool":58,"command":59},"bunx","bunx skills add SamuelChien\u002Fmega-skills-collection --skill kubernetes-operator",{"tool":61,"command":62},"pnpm","pnpm dlx skills add SamuelChien\u002Fmega-skills-collection --skill kubernetes-operator","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fskills-kubernetes-operator\u002FSKILL.md",true,[],[67,74,81,88,95,103],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":19},"01M76R4WZQZAXGGXMQCA0FZ716","zustand-store-ts","Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state\u002Faction separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-ts\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M76R4T9KENDH7FENGZQHBW4G","zustand-store-creator","Zustand Store Creator - Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M76R3YWN84B7SANJ52X799ZE","zero-trust-config-helper","Zero Trust Config Helper - Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M76R3HNSV2AEYSKHM915GJ58","zapier-integration-helper","Zapier Integration Helper - Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":99,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M76R3DJSKAT4FA7DV4BF3GCE","zai-cli","Execute z.AI CLI providing vision, search, reader, and GitHub exploration via CLI and MCP.\nUse when user needs image\u002Fvideo analysis, OCR, UI-to-code conversion, error diagnosis,\nreal-time web search, web page to markdown extraction, or GitHub code exploration.\nTrigger with phrases like \"analyze this image\", \"search the web for\", \"read this page\",\n\"explore this repo\", or \"use zai\". Requires Z_AI_API_KEY.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fzai-cli\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M76R2KAM699XE9AJVAWE4H2E","yt-research","Research competitor YouTube channels, niches, and trending topics for your content strategy.\nUse this skill whenever the user says \"research channels\", \"analyze competitors\", \"find trending topics\",\n\"niche analysis\", \"competitive research\", \"what are other creators doing\", \"scrape YouTube channels\",\nor wants to understand the competitive landscape for a specific tool or topic area. Use when working with yt research. Trigger with 'yt', 'research'.","https:\u002F\u002Fgithub.com\u002FSamuelChien\u002Fmega-skills-collection\u002Fblob\u002Fmain\u002Fyt-research\u002FSKILL.md",[],[]]