Example Controller
A simple example of a Kubernetes controller written in Golang.
What it does is whenever a new Deployment is created in "default" namespace, it will expose the Deployment by creating a Service and an Ingress.
See also: client-go under the hood
How to run?
go build -o bin/example-controller
bin/example-controller \
--kubeconfig=$HOME/.kube/config \
--workers 2 \
--namespace default
Open another terminal and create a Deployment:
kubectl create -f ./example/deployment.yaml
Watch the logs of the controller.