Bird
0
0

How can you customize the reconciliation logic of your operator after generating the API and controller scaffolding?

hard📝 Application Q9 of 15
Kubernetes - Operators and Custom Resources
How can you customize the reconciliation logic of your operator after generating the API and controller scaffolding?
ARun 'operator-sdk customize reconcile' command
BEdit the Reconcile function in the controller source code
CChange the Kubernetes API server configuration
DModify the CRD YAML files directly to add logic
Step-by-Step Solution
Solution:
  1. Step 1: Identify where reconciliation logic lives

    The reconciliation logic is implemented in the Reconcile function inside the controller Go source code.
  2. Step 2: Exclude invalid options

    CRD YAML files define schema, not logic; Kubernetes API server config is unrelated; no such 'customize reconcile' command exists.
  3. Final Answer:

    Edit the Reconcile function in the controller source code -> Option B
  4. Quick Check:

    Reconcile function is where operator logic is customized [OK]
Quick Trick: Customize operator by editing Reconcile function code [OK]
Common Mistakes:
  • Trying to add logic in CRD YAML files
  • Assuming Kubernetes API server config controls logic
  • Looking for non-existent SDK commands

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes