Skip to content

About

Docker container that notifies (using Telegram messages) if there are restarting pods in a Kubernetes cluster

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

KUBEGUARDOG

Dependencies

Environment variables

NAME DESCRIPTION DEFAULT VALUE REQUIRED
NAMESPACE List pods of this namespace all NO
LOG_LEVEL Logging level INFO NO
TELEGRAM_TOKEN Token for Telegram authentication NO
TELEGRAM_CHAT_ID ID of the Telegram user/group to send notifications NO1

Volumes

TYPE CONTAINER PATH DESCRIPTION
file /kubeconfig.yaml Kubeconfig file

How to execute

List pods of all namespaces:

docker run -ti --rm --network host \
-v ~/kubeconfig/ef1bau.yaml:/kubeconfig.yaml \
osmollo/kubeguardog:latest

List pods of namespace example-ns:

docker run -ti --rm --network host \
-v ~/kubeconfig/ef1bau.yaml:/kubeconfig.yaml \
-e NAMESPACE=example-ns \
osmollo/kubeguardog:latest

Send notifications to Telegram:

docker run -ti --rm --network host \
-v ~/kubeconfig/ef1bau.yaml:/kubeconfig.yaml \
-e NAMESPACE=example-ns \
-e TELEGRAM_TOKEN="<TELEGRAM_TOKEN>" \
-e TELEGRAM_CHAT_ID=<TELEGRAM_CHAT_ID" \
osmollo/kubeguardog:latest

Alternative motherfucking way

kubectl --kubeconfig ~/kubeconfig/file.yaml get pods | awk '$4>0'

About

Docker container that notifies (using Telegram messages) if there are restarting pods in a Kubernetes cluster

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages