Group Name: pritamdas.dev
Version Name: v1alpha1
Resource Name: Kluster
Code gen is needed for generating:
- DeepCopyObject
- Clientset
- Informer
- Lister
- cd ~/$Your_Go_Path/sample-controller
- import
"k8s.io/code-generator"intomain.go - run
go mod tidy;go mod vendor - run
chmod +x vendor/k8s.io/code-generator/generate-groups.sh - run
chmod +x ./hack/codegen.sh - run
hack/codegen.sh - again run
go mod tidy;go mod vendor
Just create a yaml file like manifests/kluster.yaml and apply.
Run kubectl apply -f pritamdas.dev_kluster.yaml
Run kubectl apply -f Kluster.yaml
Run kubectl get Kluster
https://www.linkedin.com/pulse/kubernetes-custom-controllers-part-1-kritik-sachdeva/
https://www.linkedin.com/pulse/kubernetes-custom-controller-part-2-kritik-sachdeva/