Skip to content

Morressier/kube-health-monitoring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

kube-health-monitoring

This is simple solution to monitor the health of your deplyoments in kuberenetes. It includes a cron job which will run every X minutes and check weather any of your deployments doesn't have running pods. If so it will send an alert message to slack.

Deployment

Prerequisites

  • kubectl

First you need to create a configmap from the shell script. For that run

kubectl create configmap available-pods-check --from-file=available-pods-check.sh

Second we need to create cron job and service account for it. Please make sure to modify cron.yaml file and set the following env variables:

  • CHANNEL
  • WEBHOOK (You can check here how to create Inbound Webhook for Slack)

Also you can change the schedule of cronjob which is set to run every 5 minutes.

After that go ahead and run

kubectl apply -f cron.yaml

You can check that your cron has been created, and the last schedule by running

kubectl get cronjob available-pods-check

Stay healthy!

About

cron job to monitor kubernetes deployments health

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages