Overview on setting up a custom k8's metrics report pushed to a discord chat for a home lab k8's cluster

Intro: This is an simple overview on setting up a custom k8’s metrics report for pods, nodes, etc. The metrics will generate a report and send the report to a discord server chat.

Prerequisites: Kubernetes Metrics Server, Discord Server, Discord Web hook

Overview: The project linked in references is a k8’s cronjob that will gather the current state of the passed in namespaces, pods of those namespaces, and all nodes. This cronjob will run every day at 6pm.

This is a very simple example. This can easily be converted to a long running process, and send alerts if a failure occurs. I encourage the reader to take part in this conversation.

Working with the k8’s metrics library is very easy, and docs are linked in references.

Working Code: GitHub - horvatic/K8s-Status-Discord-Bot

K8’s metrics: Access Clusters Using the Kubernetes API | Kubernetes