Local Setup
System: centos7
-
pull botkube code
git clone -b release-1.0 https://github.com/kubeshop/botkube.git -
download binary
go mod tidy -
build binary
go build ./cmd/botkube/ -
create a local configuration file to override default values (create slack app)
cat > local_config.yaml << EOF communications: default-group: socketSlack: enabled: true channels: default: name: botkube appToken: "xapp-xxxxxxxxxxxxxx" botToken: "xoxb-xxxxxxxxxxxxxx" configWatcher: enabled: false settings: clusterName: "labs" analytics: # -- If true, sending anonymous analytics is disabled. To learn what date we collect, # see [Privacy Policy](https://botkube.io/privacy#privacy-policy). disable: true EOF -
Add values.yaml
values.yaml 提取码:"5rlp"
-
export the path to the configuration file
export BOTKUBE_CONFIG_PATHS="/root/xxx/code/values.yaml,/root/xxx/code/local_config.yaml" -
export the path to kubeconfig
export BOTKUBE_SETTINGS_KUBECONFIG=/root/.kube/config -
if this is a demo deployment of Botkube and does have not a Kubernetes cluster locally, you can do that: install K3s.
-
make sure you are able to access your k8s cluster
kubectl cluster-info -
run botkube application
./botkube -
make sure your Slack is able to access your Botkube
setup botkube-proxy (nginx)
- install docker
yum install -y docker
systemctl enable docker
systemctl start docker
- pull nginx
docker pull nginx
- docker setup nginx via mount configuration file nginx.conf, default.d, botkube-pluginxs to container lib, expose container port 80 to local port 8080.
docker run --name botkube-proxy -d -v /root/xxx/nginx/nginx.conf:/etc/nginx/nginx.conf -v /root/xxx/nginx/default.conf:/etc/nginx/conf.d/default.conf -v /root/xxx/botkube-plugins:/home/ -p 8080:8080 nginx
- build the demo executors and sources of Botkube plugins