This project demonstrates: How to create your own k8s Custom Resource Definition(CRD) and a k8s Operator for it.
How to generate code for this project: Run following commands in ~/go/src/github.com/k8s-crd-operator-demo directory
- go mod init (optional if go.mod is absent)
- go mod vendor (optional if vendor directory or k8s.io/code-generator is absent)
- bash -x vendor/k8s.io/code-generator/generate-groups.sh all
"github.com/rahulsidgondapatil/k8s-crd-operator-demo/pkg/client"
"github.com/rahulsidgondapatil/k8s-crd-operator-demo/pkg/apis"
customcontroller:v1alpha1
--go-header-file ./hack/boilerplate.go.txt