pod event controller

kubernetes/sample-controller is not simple.

docker

You can build and push image by yourself

docker build -f docker/Dockerfile -t gaoxinge/pod-event-controller .
docker push gaoxinge/pod-event-controller:latest

or directly use

yaml

kubectl create -f yaml/pod-event-controller.yaml
kubectl create serviceaccount pod-event-controller
kubectl create clusterrolebinding pod-event-controller --clusterrole=cluster-admin --serviceaccount=default:pod-event-controller
kubectl delete clusterrolebinding pod-event-controller
kubectl delete serviceaccount pod-event-controller
kubectl delete deployment pod-event-controller

test

kubectl get pod # pod-event-controller-5b8568f979-x7shr
kubectl logs -f pod-event-controller-5b8568f979-x7shr -c main

TODO

  • add pod event controller test