<p>I am sorry if this question has been answered but after trying many different ways of googling for an answer, I have failed to get a definitive explanation so I am trying to seek clarifications here.</p>
<p>I am familiar with the operator/controller pattern in the context of Kubernetes and am trying to build a custom nodejs controller that handles my own custom-defined resource (CRD) using one of the nodejs Kubernetes Client libraries from <a href="https://kubernetes.io/docs/reference/using-api/client-libraries/#officially-supported-kubernetes-client-libraries" rel="noreferrer">Kubernetes.io</a>.</p>
<p>While researching online, I came across OperatorSDK and Kubebuilder which seems to be tools that can bootstrap operators/controllers, providing the many functionalities to interface with the K8s Api Server much like the Kubernetes Client Libraries.</p>
<p>OperatorSDK and Kubebuilder seems to be more than just libraries
So here are my questions</p>
<ol>
<li>What are the differences between the likes of <strong>OperatorSDK, Kubebuilder</strong> AND <strong>Kubernetes Client libraries</strong> from <a href="https://kubernetes.io/docs/reference/using-api/client-libraries/#officially-supported-kubernetes-client-libraries" rel="noreferrer">Kubernetes.io</a></li>
<li>Are the Kubernetes Client Libraries implementations of things like the OperatorSDK and Kubebuilder?</li>
<li>Do I need to use the OperatorSDK or Kubebuilder to implement my own controller because, as far as I can tell, the Kubernetes client library seems to suffice.</li>
</ol>

<blockquote>
<p>What are the differences between the likes of OperatorSDK, Kubebuilder
AND Kubernetes Client libraries from Kubernetes.io</p>
</blockquote>
<p>OperatorSDK, Kubebuilder are specialized  and gives you good starting point by generating boiler plate code and a runtime(via controller runtime) necessary to implement a controller in kubernetes. Client libraries are generate purpose library to do anything such as interacting with Kubernetes API Server etc.</p>
<blockquote>
<p>Are the Kubernetes Client Libraries implementations of things like the
OperatorSDK and Kubebuilder?</p>
</blockquote>
<p>No. Actually OperatorSDK , Kubebuilder under the hood uses <a href="https://github.com/kubernetes-sigs/controller-runtime" rel="noreferrer">controller runtime</a> which internally uses kubernetes client library to interact with Kubernetes API Server.</p>
<blockquote>
<p>Do I need to use the OperatorSDK or Kubebuilder to implement my own
controller because, as far as I can tell, the Kubernetes client
library seems to suffice.</p>
</blockquote>
<p>If you just use kubernetes client library you will end up writing some boiler plate code and patterns which are already provided by OperatorSDK and Kubebuilder or controller runtime. It's highly recommended but not mandatory to use OperatorSDK or Kubebuilder to write controllers. You could also use controller runtime directly instead of using OperatorSDK or Kubebuilder.</p>
