Kube-bot is a Kubernetes chatbot for Slack.
2.0K
To run Kube-bot on Slack, first you need to create a new bot user integration on Slack and get the token.
Then you need to know the channel ids where you want to run the Kubebot. You can get them on https://slack.com/api/channels.list?token={REPLACE WITH YOUR TOKEN}
You can build the docker image and run it locally:
docker build -t my-kube-bot .
Or pull the image from the Docker reigstry and run it with the below configuration:
docker run -e KUBEBOT_SLACK_TOKEN="xoxb-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-e KUBEBOT_SLACK_CHANNELS_IDS="1122334" \
-e KUBEBOT_SLACK_ADMINS_NICKNAMES="edgar" \
-e KUBEBOT_SLACK_VALID_COMMANDS="get" \
poetapp/kube-bot
The fastest way to run Kube-bot in your Kubernetes cluster is using the Kube-bot chart for Kubernetes.
Set the following environment variables:
# use the token you generated in the setup
KUBEBOT_SLACK_TOKEN="replacewithyourtoken"
# use as many channels ids you want; use a space as a separator
KUBEBOT_SLACK_CHANNELS_IDS="1234 4321"
# use as many admin nicknames as you want; use a space as separator
KUBEBOT_SLACK_ADMINS_NICKNAMES="nickname1 nickname2"
# set which kubectl commands the admins will be able to run
KUBEBOT_SLACK_VALID_COMMANDS="get describe logs explain"
The helm chart creates RBAC which you can tweak to provide the level of permissions you want to grant from slack.
Content type
Image
Digest
Size
32.8 MB
Last updated
about 8 years ago
docker pull poetapp/kube-bot