#kubernetes #audit #logs #tui #events

bin+lib kubernetes-audit-log-explorer

TUI查看Kubernetes审计日志

1 个不稳定版本

0.1.0 2024年7月8日

#2922命令行工具

MIT 许可证

200KB
422

Kubernetes审计日志探索器(KALE)

假设您有一些审计日志

$ cat data
{"kind":"Event","apiVersion":"audit.k8s.io/v1","level":"Metadata","auditID":"ec95c2ca-00d4-40b9-93b4-78a6eb1242c7","stage":"ResponseComplete","requestURI":"..."
{"kind":"Event","apiVersion":"audit.k8s.io/v1","level":"Metadata","auditID":"2f8eb783-8d8b-4540-92db-899f5f0f126a","stage":"ResponseComplete","requestURI":"..."
{"kind":"Event","apiVersion":"audit.k8s.io/v1","level":"Metadata","auditID":"cddf4c0e-9eda-4e17-b9bf-a0af05132186","stage":"ResponseComplete","requestURI":"..."

kale将通过stdin接受它们

$ kale < data

或者您可以使用awslogs等工具实时跟踪

$ awslogs get /aws/eks/YOUR-CLUSTER-LOG-GROUP 'kube-apiserver-audit.*' -G -S -s1h | kale

快捷键

效果
ESCQ 退出
上箭头下箭头 滚动日志列表
PageUpPageDown 滚动请求/响应窗口

屏幕截图

依赖项

~10–19MB
~222K SLoC