Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

PodLogsWatcher

This project shows how you can tail all the PODs logs you want leveraging the API offered by fabric8io/kubernetes-client;

Basically it showcases you can do in Java the same thin stern achieves using GO;

To see it in action, download minikube and run:

minikube start
mvn test

This command starts test PodLogsTestCase and this is what happens:

  • the test has the custom annotation @PodLog
  • the custom annotation @PodLog has the JUnit 5 annotation @ExtendWith(PodLogExtension.class): this annotation tells JUnit to register the PodLogExtension custom extension
  • the PodLogExtension custom extension starts watchLog for every newly running POD

Loggable#watchLog is an API offered by fabric8io/kubernetes-client which tails a POD's log and redirects it to an OutputStream;

About

shows how you can tail all the PODs logs you want leveraging the API offered by fabric8io/kubernetes-client

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages