Skip to content
Slackbot to send important alerts from the Kubernetes event stream API to a slack channel
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
images Adding screenshot. Apr 23, 2016
.dockerignore Add Namespace to message, add .dockerignore Aug 5, 2016
.gitignore .gitignore updates Apr 23, 2016
Dockerfile Adding Apache V2 License Apr 23, 2016 switch to deployment over rc. May 20, 2016
main.go Add Namespace to message, add .dockerignore Aug 5, 2016

Kubernetes Events Slack Bot (slack8s)

Kubernetes Slack Integration - Infinite loop go program which queries the Kubernetes Event Stream API and posts messages to slack for important events.

Slack8s demo showing creation of pod and then failed backoff loop alerts via Slack.


Given this is an active work in progress, you'll probably want to modify and build the code yourself. If you just want to get started quickly, use the image in docker hub.

  1. docker build .
  2. Tag and push to your favorite registry


  1. Create a new Slack Bot.
  2. Copy the example configmap file:
    cp examples/example.slack8s-configmap.yaml examples/slack8s-configmap.yaml
  3. Modify slack-token and slack-channel variables in your new file.
  4. Create the config map using kubectl:
    kubectl create -f examples/slack8s-configmap.yaml
  5. Create the slack8s deployment:
    kubectl create -f examples/slack8s-deployment.yaml


  1. This does not keep track of which notifications it has sent. You should not trust that slack has every event.
  2. When the container dies, if the container takes more than 1 minute to spawn, some events will not be posted to slack.
  3. When the container dies, events within 1 minute of the restart will be posted to Slack twice.
  4. The watch api seems to hit EOF causing this container to die more often than desired. On a busy cluster, the above limitations are more obvious because of this.
  5. Do not attempt to use this as a replacement for a pager.


  1. Refactor the way in which the types of alerts to send to slack are configured
  2. Add more types of alerts which get posted to slack
  3. Better formatting of slack attachment output
  4. Alerting thresholds
You can’t perform that action at this time.