kubetailrb
🎯 Objectives
Learn ruby and ruby on rails by creating an application.
The application goal is to read the logs from multiple pods, like stern or kubetail but using ruby, and also support ECS log format to display in human-readable format.
🗺️ Plan
GitHub - l-lin/kubetailrb: Tail your k8s pod logs at the same time.
-
create CLI application
-
display file
-
follow file content
-
connect to kubernetes (e.g. use kubeclient)
-
display log of a single pod in the terminal
-
display log of pods in the terminal
-
follow logs of pods in the terminal
-
colorize logs
-
format ECS logs into human-readable format in the terminal
-
use
ArgumentError
instead of custom exception -
flush stdout in the
clock
app -
bare ruby on rails application that use
kubetailrb
as dependency -
create simple form page
- text field to give filename
- display the file content in the web page
-
create form page to display the namespace pods
- use kubeclient to list the pods of the given namespace
- display in the web page
-
create web page to read logs of a single pod
- use kubeclient to get the logs for a given pod
- display in the web page
-
update pod page to redirect pod link to read logs
-
update to follow logs of a single pod
- automatically refresh the content of the web page
- use SSE or websocket?
-
format ECS logs into human-readable format
-
colorize logs
-
watch kubernetes events (e.g. pods added, removed, …)