k8s-controller-perf

Optimize Kubernetes controller performance with field indexers, predicate filters, and cache tuning.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Performance tuning patterns for Kubernetes controllers to reduce reconciliation noise, improve cross-resource lookups, and optimize CPU/memory usage across large clusters.

Core Features & Use Cases

  • Field indexers for O(1) lookups across cross-resource references
  • Predicate filters to minimize reconciles and noisy events
  • Cache optimization and work queue tuning for predictable throughput
  • Observability patterns to measure latency, queue depth, and retries
  • Use cases include controllers managing many Custom Resources in large clusters

Quick Start

Apply these patterns to your controller and measure reconciliation latency, cache hit rate, and throughput.

Frequently Asked Questions about k8s-controller-perf

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

FAQPage Schema
How do I optimize Kubernetes controller performance for large clusters?

Kubernetes controller reconciliation noise is reduced by applying predicate filters to drop irrelevant events and using field indexers for efficient cross-resource lookups, preventing unnecessary processing.

How do field indexers improve cross-resource lookups in controller-runtime?

Field indexers improve cross-resource lookups in controller-runtime by enabling O(1) cache retrievals for related resources, significantly reducing CPU usage compared to listing and filtering resources dynamically.

What observability patterns measure Kubernetes controller latency and queue depth?

Observability patterns for Kubernetes controllers measure reconciliation latency, queue depth, and retry rates to identify performance bottlenecks and verify that cache optimizations and work-queue tuning are effective.

Can I use predicate filters to stop noisy reconciliations in custom resource controllers?

Predicate filters can stop noisy reconciliations in custom resource controllers by evaluating event metadata and dropping updates that do not change relevant spec fields before they enter the work queue.

When should I tune work queues and cache settings for production-grade controllers?

Tune work queues and cache settings for production-grade controllers when managing large numbers of custom resources, ensuring predictable throughput and preventing memory spikes during high-event-volume periods.