<p>I want to use serving api which is the part of the knative serving repo to create serving application. Since i'm writing a custom controller, i need to make use of Go client. I'm finding it difficult to generate boiler plate code using the code-generator. I'm following the below mentioned blog on how to do it.</p>
<ol>
<li><a href="https://insujang.github.io/2020-02-13/programming-kubernetes-crd/#write-template-code" rel="nofollow noreferrer">https://insujang.github.io/2020-02-13/programming-kubernetes-crd/#write-template-code</a></li>
<li><a href="https://blog.openshift.com/kubernetes-deep-dive-code-generation-customresources/" rel="nofollow noreferrer">https://blog.openshift.com/kubernetes-deep-dive-code-generation-customresources/</a></li>
</ol>
<p>But i couldn't achieve it. Any help is appreciated.</p>

coders
<p>Yes, code generation for controllers is not the most easy thing. And it has changed over the years.</p>
<p>To start writing a controller with code generation, I would recommend to use Kubebuilder and follow the <a href="https://kubebuilder.io/" rel="nofollow noreferrer">Kubebuilder guide</a>. And perhaps do custom things when that is understood.</p>
<p>The Kubebuilder guide includes chapters on how to generate CRD code using <a href="https://kubebuilder.io/reference/generating-crd.html" rel="nofollow noreferrer">controller-gen</a>.</p>
