k8s-controller-ops

Implement Kubernetes controller patterns with leader election, RBAC, finalizers, and SSA.

3|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/missBerg/envoy-skills --skill k8s-controller-ops
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: k8s-controller-ops
Source: https://github.com/missBerg/envoy-skills/tree/main/shared/contributors/skills/k8s-controller-ops
Command: npx skills add https://github.com/missBerg/envoy-skills --skill k8s-controller-ops

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Operational patterns for Kubernetes controllers are complex and error-prone in production; this skill codifies best practices for reliability and safety across common scenarios.

Core Features & Use Cases

  • Leader election patterns to ensure a single active reconciler and fast failover
  • RBAC management with least-privilege configuration for controller components
  • Finalizer safety with idempotent cleanup using MergeFrom patches
  • Server-Side Apply (SSA) for owned resources and declarative reconciliation
  • Extension points and hooks to integrate external processing or validation
  • Credential rotation and secure secret handling for long-running controllers
  • Drift detection and periodic re-sync to maintain desired state

Quick Start

Configure and deploy a production-grade Kubernetes controller that safely implements leader election, RBAC, finalizers, SSA, extension hooks, credential rotation, and drift detection.

Frequently Asked Questions about k8s-controller-ops

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement leader election in a Kubernetes controller to ensure a single active reconciler?

Kubernetes controller leader election uses Lease-based patterns to ensure a single active reconciler. This provides fast failover and safe reconciliation across development, staging, and production environments.

What's the best way to manage Kubernetes controller finalizers for safe resource cleanup?

Kubernetes controller finalizers should use MergeFrom patches for idempotent cleanup. This ensures safe resource deletion by preventing orphaned dependencies and guaranteeing cleanup operations complete during controller restarts.

When do I need Server-Side Apply (SSA) for Kubernetes controller reconciliation?

Server-Side Apply (SSA) is needed for Kubernetes controllers managing owned resources declaratively. SSA tracks field ownership, preventing conflicts between multiple controllers writing to the same resources during reconciliation.

How does drift detection work for Kubernetes controllers maintaining desired state?

Drift detection for Kubernetes controllers uses periodic re-sync to compare actual cluster state against desired state. This ensures continuous state correction and maintains desired configuration across development, staging, and production workflows.

Can I configure least-privilege RBAC for Kubernetes controller components?

Yes, Kubernetes controller RBAC supports least-privilege configuration for controller components. This restricts permissions to only necessary resources and verbs, reducing blast radius and improving production security posture.

How do I handle credential rotation for long-running Kubernetes controllers?

Long-running Kubernetes controllers handle credential rotation through secure secret management patterns. This maintains valid authentication without downtime during periodic security rotations or key expirations in production environments.