Skip to content

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

Notifications You must be signed in to change notification settings

Tommy74/PodLogsWatcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages