kubernetes / sample-controller

Repository for sample controller. Complements sample-apiserver
Apache License 2.0
3.18k stars 1.1k forks source link

How to create CustomResourceDefinition using typed client #21

Closed xianlubird closed 6 years ago

xianlubird commented 6 years ago

In this example, we have to use kubectl create the CustomResourceDefinition. But how do we create it through client-go in code ?

radu-munteanu commented 6 years ago

It's similar to how they create the deployment resource.

devdattakulkarni commented 6 years ago

@xianlubird Probably you have already figured it out..If not, check this example:

https://github.com/cloud-ark/labs/tree/master/register-crd-example