https://github.com/jsenon/k8sslackevent
Watch k8s event and publish to slack
https://github.com/jsenon/k8sslackevent
audit event kubernetes slack
Last synced: about 2 months ago
JSON representation
Watch k8s event and publish to slack
- Host: GitHub
- URL: https://github.com/jsenon/k8sslackevent
- Owner: jsenon
- License: apache-2.0
- Created: 2018-07-13T22:02:30.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-24T19:21:00.000Z (about 7 years ago)
- Last Synced: 2025-09-12T08:16:29.163Z (10 months ago)
- Topics: audit, event, kubernetes, slack
- Language: Go
- Size: 4.08 MB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
- License: LICENSE
Awesome Lists containing this project
README
# K8S Event Watcher
[](https://circleci.com/gh/jsenon/k8sslackevent)
[](https://goreportcard.com/report/github.com/jsenon/k8sslackevent)
An event watcher for Kubernetes Environment, and publish on slack
## Func
- Pod Event Watcher on default and kube-system namespace
- Node Event Watcher
- Event Watcher
- Publisher on slack
- Watch OOMKilled Event and retrieve pod name
- External or Internal k8s api
### Build
### Usage
Right now pod watcher is available on default and kube-system namespaces
Create Webhook slack application and export URL
```sh
export SLACK_URL=https://hooks.slack.com/xxx
```
For internal k8s:
```sh
k8sslackevent serve --api internal
```
For External k8s, its based on current context in your .kube/config file:
```sh
k8sslackevent serve --api external
```
### Env
- `SLACK_URL` = Slack URL Hook
### TIPS
If you receive `cannot execute binary file: Exec format error`
Compile with `CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build main.go`
And build `docker build -t jsenon/k8sslackevent:vx.x .`
### TODO
- [ ] Specify Pod watcher namespace as flag
- [ ] Add Event bus integration