kube-problem

command module
v0.0.0-...-c23e532 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

README

Kube Problem Reporter

Simple kubernetes cluster watcher that checks periodically if all nodes and pods in a certain namespace are running and sends a message to a slack channel if there is a problem with a node or pod.

Problems reporter reports:

  • Node conditions such as memory pressure or disk pressure
  • High node resource utilization for over 10 minutes (>95% of memory or cpu) (only if metrics server is available)
  • Critical pod status such as ErrImagePull, Error, CrashLoopBackOff etc.
  • Pods that are still not running for more than 30 minutes
  • Pods that have restarted in the last hour with a non zero exit code

Watched namespaces and nodes can be configured with the WATCH_NODES and WATCH_NAMESPACES environment variables.

How to install

Fill in your slack token and channel_id in kube/deployment.yaml. Then deploy the reporter:

kubectl create namespace kube-problem
kubectl apply -n kube-problem -f kube
kubectl create clusterrolebinding kube-problem-binding --clusterrole=kube-problem --serviceaccount=kube-problem:kube-problem

Contribute

To start kube problem reporter in development mode, download devspace and simply run:

kubectl create namespace kube-problem
kubectl create clusterrolebinding kube-problem-binding --clusterrole=kube-problem --serviceaccount=kube-problem:kube-problem
devspace dev -n kube-problem

Then start the reporter in the terminal with:

go run main.go

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳