This gist is a quick example of how to run PoshBot inside Kubernetes using minikube.
This will deploy PoshBot v0.11.3
inside a Linux container and expose most configuration options as environment variables.
The Slack bot token is stored as a Kubernetes secret.
Create a Kubernetes secret which includes your Slack bot token.
This secret will be later be exposed to the pod as the POSHBOT_SLACK_TOKEN
environment variable.
echo -n '<SLACK-TOKEN>' > ./slack_token.txt
kubectl create secret generic poshbot-slack-token-secret --from-file ./slack_token.txt
Most PoshBot configuration options are exposed as environment variables which you can set in from the ConfigMap in the yaml file.
To enable persistence, the deployment creates two volumes that mount to /poshbot_data
and /root/.local/share/powershell/Modules
in the container.
Mounting a volume for the modules directory ensures any plugins installed persist across container restarts.
kubectl apply -f ./poshbot.yml