<p>I am building an operator using operator-sdk version 1.2 and I do understand we have a reconciliation loop but I was referring to some GitHub repos and unable to make out the use of the NewController function. It seems that these GitHub repos are developed using operator-sdk but in operator-sdk 1.2, I do not need to find any Newcontroller function.</p>
<p>For example, I was referring to <code>https://github.com/oracle/mysql-operator</code> and looking at the <code>https://github.com/oracle/mysql-operator/blob/master/pkg/controllers/cluster/controller.go</code> and I do not find NewControllerfunction in the current operator-sdk.</p>
<p>Also, I do not understand how this MySQL operator is using kubeconfig? Do we need to pass the kubeconfig location to execute the command in the container? Is there a way to read the kube config without passing kubeconfig location in operator-sdk?</p>

drifter
<p>If you're building a new operator and you plan to use Operator SDK, then I recommend reading the official <a href="https://sdk.operatorframework.io/docs/building-operators/golang/tutorial/" rel="nofollow noreferrer">Operator SDK: Go tutorial</a>. You can find another example of Go-based operator <a href="https://github.com/leszko/build-your-operator/tree/main/operator-sdk-go" rel="nofollow noreferrer">here</a>.</p>
<p>Concerning the kube config, it will use your default location if you don't specify anything. So the default kubeconfig your <code>kubectl</code> is configured with.</p>
