Логотип Kubernetes Operator Development

Kubernetes Operator Development

Спільнота
d-padmanabhan
kubernetes-operator-development

Designs, implements, reviews, tests, and operates Kubernetes operators and controllers in Go with Kubebuilder and controller-runtime. Use when defining CRDs, reconciliation loops, status conditions, finalizers, admission webhooks, external-provider controllers, operator upgrades, envtest suites, or controller-runtime cache, retry, and concurrency behavior.

Огляд

Видавецьd-padmanabhan
Репозиторійagent-engineering-handbook
Назва навичкиkubernetes-operator-development
Зірки
20
Форки
3
Файли в пакеті
5
ЛіцензіяMIT
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Файлів у комплекті: 5

    Скрипти, шаблони й довідкові матеріали, які модель може читати під час роботи. Файли доступні лише для читання й ніколи не виконуються.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем d-padmanabhan. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Kubernetes Operator Development у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/d-padmanabhan/agent-engineering-handbook/tree/main/skills/kubernetes-operator-development
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/d-padmanabhan/agent-engineering-handbook.git /tmp/agent-engineering-handbook
mkdir -p .claude/skills
cp -r /tmp/agent-engineering-handbook/skills/kubernetes-operator-development .claude/skills/kubernetes-operator-development
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Kubernetes Operator Development в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Kubernetes Operator Development, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Kubernetes Operator Development не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Kubernetes Operator Development

Mandatory controller and cluster-mutation gates live in the Kubernetes rule (${HANDBOOK_ROOT}/rules/450-kubernetes.mdc). This skill owns the operator design and implementation workflow. Use the Kubernetes containers skill (${HANDBOOK_ROOT}/skills/kubernetes-containers/SKILL.md) for workloads, Helm, Argo CD, and cluster operations.

Core Contract

A custom resource expresses desired intent. Reconciliation observes desired and actual state, performs retry-safe work, and records what was observed. Events only indicate that state might have changed; they are not durable exactly-once commands.

Every design must answer:

  • What is authoritative, and which fields does this controller own?
  • How is each external resource identified and ownership-verified?
  • What happens after duplicate delivery, restart, timeout, or lost response?
  • What is safe to create, adopt, update, retain, and delete?
  • What makes each condition current for the resource generation?
  • What bounds retries, provider calls, concurrency, and tenant impact?
  • How are API and operator upgrades rolled forward and back?

Do not implement a one-shot provisioning workflow inside Reconcile.

Decide Whether to Build an Operator

Prefer an existing Kubernetes API, vendor operator, Crossplane provider, cloud service operator, or composition mechanism when it already provides the required ownership and lifecycle semantics.

Build a custom operator when continuous convergence, a domain-specific API, multi-resource ownership, or custom lifecycle policy creates clear platform value. Do not wrap a trivial remote API call merely to expose it as a CRD.

Design Before Coding

Complete the design review template (${HANDBOOK_ROOT}/skills/kubernetes-operator-development/references/design-review-template.md) before scaffolding implementation. Resolve:

  1. API intent, scope, maturity, and compatibility.
  2. Source of truth and field ownership.
  3. External identity, collision prevention, and adoption proof.
  4. finalizer, deletion, orphan, and recovery behavior.
  5. status conditions and readiness semantics.
  6. retry, rate-limit, timeout, and concurrency budgets.
  7. authentication, Kubernetes RBAC, and provider authorization.
  8. test, upgrade, observability, and rollback evidence.

Use Kubebuilder scaffolding unless repository constraints justify another framework. Verify current Kubebuilder, controller-runtime, Go, and Kubernetes compatibility from official release and support documentation. Do not copy version-specific snippets without checking the repository's pinned versions.

Reconciliation Workflow

Keep Reconcile as orchestration:

  1. Read the primary resource; ignore a true API NotFound.
  2. Handle deletion before normal reconciliation.
  3. Persist the finalizer before creating resources that require cleanup, then return or re-read before continuing.
  4. Validate runtime prerequisites not enforceable at admission.
  5. Observe actual state and verify ownership.
  6. Build desired state and calculate the owned-field delta.
  7. Apply at most the safe, bounded work justified by current observations.
  8. Update status through the status subresource with current conditions and observedGeneration.
  9. Return an error or explicit requeue only under the documented retry policy.

External creation must survive a successful provider mutation followed by a lost response. Prefer a provider idempotency key or conditional create tied to stable operation identity. Observe-before-create is useful but is not by itself race-safe.

Use stable provider identifiers plus verifiable ownership metadata such as the Kubernetes namespace, name, and UID. Status is operational state, not proof of ownership. A deleted and recreated CR has a new UID and must not silently inherit destructive authority over an old external resource.

Detailed runtime guidance: ${HANDBOOK_ROOT}/skills/kubernetes-operator-development/references/reconciliation-runtime.md.

Use controller-runtime's managed cache and event pipeline for normal operators. Declare primary, owned, and dependency watches through the builder, with indexes, mapping functions, and predicates where needed. Do not implement a raw Kubernetes Watch loop or copy a short global resync interval as a substitute for complete event sources and level-based convergence. Use client-go shared informers directly only for a documented lower-level need.

API and Lifecycle

  • Use apiextensions.k8s.io/v1 structural schemas and prune unknown fields.
  • Prefer OpenAPI defaults and validation, then CEL, then admission webhooks only when schema mechanisms cannot express the policy.
  • Model lists and maps with explicit merge semantics where field ownership or Server-Side Apply depends on them.
  • Use metav1.Condition; condition types are positive summaries, reasons are stable machine-readable identifiers, and messages are safe human context.
  • Make destructive deletion and adoption explicit, authorized, auditable, and ownership-checked. Conservative defaults are required for durable data.
  • Treat conversion, storage-version migration, default changes, and rollback as one upgrade contract.

Detailed API guidance: ${HANDBOOK_ROOT}/skills/kubernetes-operator-development/references/api-lifecycle.md.

Provider and Security Boundaries

  • Prefer workload identity. Keep raw credentials outside model, CR spec, status, logs, events, and metrics.
  • Grant Kubernetes and provider permissions per resource and action; avoid wildcard access.
  • Validate provider destinations and identifiers. User-controlled endpoints require scheme, host, redirect, DNS, address, timeout, and response-size controls.
  • Reuse bounded provider clients and transports. Coordinate controller, provider SDK, and HTTP retry layers so delays do not multiply.
  • Apply global and per-tenant concurrency and rate limits. A noisy tenant must not consume the entire controller or provider budget.
  • Do not force Server-Side Apply ownership over fields managed by humans or other controllers.

Use the workload identity, service resilience, observability, security testing, and Go systems skills for their canonical cross-cutting workflows.

Verification

Test at the smallest layer that proves the behavior:

  • unit tests for desired-state construction, diffs, classification, and provider translation;
  • API-server or envtest tests for schema, status, finalizers, watches, indexes, conflicts, and reconciliation;
  • provider contract tests for idempotency, lost responses, throttling, eventual consistency, and ownership checks;
  • upgrade tests for served and storage versions, conversion, changed defaults, rollback, and existing objects;
  • end-to-end tests for create, drift, partial failure, restart, deletion, retention, adoption, and orphan recovery.

Fake clients do not prove API-server behavior. envtest does not run every Kubernetes controller, so garbage collection and other control-plane behavior need explicit substitutes or real-cluster tests.

Run repository generation, formatting, lint, race, vulnerability, manifest, schema, and test commands. Confirm generated code and manifests are current and inspect their diff. See the testing and operations reference (${HANDBOOK_ROOT}/skills/kubernetes-operator-development/references/testing-operations.md).

Review Output

Lead with correctness and data-loss risks. Report:

  1. API and ownership contract.
  2. Reconciliation safety under retry, concurrency, and partial failure.
  3. Deletion, adoption, and upgrade hazards.
  4. Security, scale, and operability gaps.
  5. Exact verification evidence and remaining limitations.

Файли в пакеті

Модель читає ці файли за потреби, поки навичку завантажено. Вони доступні для читання й ніколи не виконуються.

Поширені запитання

Що робить навичка ШІ Kubernetes Operator Development?

Designs, implements, reviews, tests, and operates Kubernetes operators and controllers in Go with Kubebuilder and controller-runtime. Use when defining CRDs, reconciliation loops, status conditions, finalizers, admission webhooks, external-provider controllers, operator upgrades, envtest suites, or controller-runtime cache, retry, and concurrency behavior.

Навіщо використовувати Kubernetes Operator Development у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Kubernetes Operator Development — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Kubernetes Operator Development у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/d-padmanabhan/agent-engineering-handbook/tree/main/skills/kubernetes-operator-development. TypingMind прочитає файл SKILL.md, додасть супровідні файли та встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Kubernetes Operator Development?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Kubernetes Operator Development?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Kubernetes Operator Development — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Kubernetes Operator Development?

Так. Навичку опубліковано на GitHub: d-padmanabhan, за ліцензією MIT. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇