Kubernetes cluster monitoring tool built with client-go informers. Because my raspberry pi nodes have a death wish.
Uses Kubernetes client-go library to register event handlers on informers. Watches pods, nodes, and deployments in real-time through informer event listeners (AddFunc, UpdateFunc, DeleteFunc).
When something goes wrong, you get notified via Discord or console output.
go build -o k3s-health-checker ../k3s-health-checker -config config.yamlMake sure you're running this inside the cluster or have kubeconfig set up properly.
Create a config.yaml:
checker:
check_pods: true
check_nodes: true
check_deployments: true
notifiers:
discord:
enabled: false
webhook_url: "https://discord.com/api/webhooks/..."
console:
enabled: truePick one:
- Discord: Set
enabled: trueand add your webhook URL - Console: Just prints to stdout
If Discord is enabled, it takes priority. Otherwise falls back to console.
go test ./...Built on top of Kubernetes client-go SharedInformer pattern:
- Creates SharedInformerFactory from clientset
- Registers event handlers (AddFunc, UpdateFunc, DeleteFunc) on pod/node/deployment informers
- Informers maintain local cache and watch API server for changes
- Event handlers check resource health status
- Sends notifications when problems detected
No polling involved. Informers handle all the watch mechanisms and caching. Event handlers get called automatically when resources change state.
- Go 1.25+
- Access to Kubernetes cluster (runs in-cluster or with kubeconfig)
- Discord webhook URL (optional)
Please See LICENSE file.