Microsoft Teams is an entirely cloud-based product. Because of this, BotKube must be publicly accessible via an HTTPS endpoint.
For a local Kubernetes cluster, you can use the tunneling software, for example ngrok
. It creates an externally addressable URL for a port you open locally on your machine.
ngrok
.ngrok
:ngrok http 3978
{ngrok_url}/bots/teams/v1/messages
, for example, https://177b-37-30-104-55.eu.ngrok.io/bots/teams/v1/messages
.If you stop and restart ngrok
, the URL changes. In such a case, you need to update the Messaging Endpoint property and reinstall the bot into your Team.
kubectl port-forward -n botkube svc/botkube 3978