Score:0

Debugging Reconcile triggers in Kubernetes Operator

cz flag

I am using a custom resource in my kubernetes cluster and have built an operator (using Operator-SDK).

In my operator reconcile function, I create a secret owned by the CR and apply it on the same namespace as the CR.

Lately, I see that reconcile function is triggered for every CR instance in the cluster. This happens periodically and in strange intervals.

Could you please suggest a method of debugging why Reconcile function is triggered?

I was thinking that ideally I would monitor changes to the CR or it's owned secret, but not sure what would be the best method to do so.

Srividya avatar
cn flag
Can you check the current version of Config Connector and try updating the version. And check the RECONCILING state in the statusMessage field in cluster logs in the console.Can you provide more information about the Reconcile function you are using.
AlexGordon avatar
cz flag
@Srividya I posted another more detailed question on stackoverflow https://stackoverflow.com/questions/69554905/debugging-why-reconcile-triggers-on-kubernetes-custom-operator (but decided to omit some details here here since they seemed to be noisy).
AlexGordon avatar
cz flag
By 'cluster logs', do you mean logs collected from pods running in the cluster into a centralized location? If so, I don't have it implemented and am not sure what I'd be looking for in these logs. Could you please explain how I'd be getting the cluster log you mentioned?
AlexGordon avatar
cz flag
I also don't know that I'm using a 'Config Connector'. I simply applied the CRD with the spec of the resource I need, then deployed the operator I created with Operator-SDK.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.