Skip to main content

Patterns

This section covers correct patterns for using kube, along with mistakes that real users encounter repeatedly. It is organized based on the most frequently asked questions from GitHub Issues and Discussions.

What This Section Covers

DocumentKey Question
Reconciler PatternsHow do you write an idempotent reconciler and avoid infinite loops?
Relations and FinalizersHow do owns/watches work internally, and when should you use finalizers?
Server-Side ApplyWhat is the correct way to use SSA, and what are the common pitfalls?
Third-Party CRDsHow do you work with CRDs you didn't create yourself?
Error Handling and BackoffWhere do different errors come from, and how do you configure backoff?
Generic ControllersHow do you build reusable reconcilers for multiple resources and run multiple Controllers?
TroubleshootingHow do you quickly resolve issues using symptom-based diagnosis, debugging tools, and profiling?

If you have already understood the internals from the Runtime Internals section, this section covers "so how should you actually use it."