CronJob Operator example from book.kubebuilder.io
- go version v1.13+.
- docker version 17.03+.
- kubectl version v1.11.3+.
- kustomize v3.1.0+
- Access to a Kubernetes v1.11.3+ cluster.
Install the CRDs into the cluster:
make install
Run the controller:
make run
Apply the CronJob
CR to the cluster:
kubectl apply -f config/samples/
Verify a pod is created every 60 seconds:
kubectl get pods
Build and push your image to the location specified by IMG
:
make docker-build docker-push <some-registry>/<project-name>:tag
Deploy the controller to the cluster with image specified by IMG
:
make deploy IMG=<some-registry>/<project-name>:tag