create kubernetes java client controller to watch pods

6/16/2021

I want to use the kubernetes java client to create a controller (using shared informer) to watch for create, update, and delete events for pods in a specific namespace. I've found some examples that watch deployments and list nodes...but cannot find examples for pods. are there any examples that are available?

-- coder123
controller
java-client
kubernetes
kubernetes-pod

1 Answer

6/16/2021

Maybe you can try the following link to understand what all things are necessary to write a custom controller and try to write your own with JAVA.

https://developers.redhat.com/blog/2019/10/07/write-a-simple-kubernetes-operator-in-java-using-the-fabric8-kubernetes-client#writing_a_simple_podset_operator_in_java

-- Deepak Mourya
Source: StackOverflow