Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/morressier/kube-health-monitoring
cron job to monitor kubernetes deployments health
https://github.com/morressier/kube-health-monitoring
Last synced: 11 days ago
JSON representation
cron job to monitor kubernetes deployments health
- Host: GitHub
- URL: https://github.com/morressier/kube-health-monitoring
- Owner: Morressier
- Created: 2020-10-31T22:13:20.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-01T13:25:55.000Z (about 4 years ago)
- Last Synced: 2024-11-08T08:29:19.642Z (2 months ago)
- Language: Shell
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
* kubectlFirst you need to create a configmap from the shell script. For that run
```bash
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](https://api.slack.com/messaging/webhooks) 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
```bash
kubectl apply -f cron.yaml
```
You can check that your cron has been created, and the last schedule by running
```bash
kubectl get cronjob available-pods-check
```Stay healthy!