Flux is a set of continuous and progressive delivery solutions for Kubernetes. This article demonstrates how to configure Flux to send realtime event notifications to a Teams channel. Although this article uses Amazon EKS, these steps should work as it is on any other Kubernetes platform as well.
This article assumes you’re already familiar with Flux & that you’ve already bootstrapped Flux onto your cluster. If not, follow Flux’s excellent getting started guide to install Flux. When you’re done, you’ll have a Git repository & your cluster will be configured to sync your cluster objects from Kubernetes manifests in the repo.
Step 1: Get Teams Channel Webhook
First, select a Teams channel where you want to receive Flux notifications & open its Connectors menu:
Add the Incoming Webhook connector:
Open the channel’s connectors again & configure the webhook:
Provide a name & click Create. Copy the generated webhook URL.
Step 2: Create Flux Alert Providers & Alerts
Now we configure Flux to send notifications to Teams.
This alert sends notifications for EVERY Flux event! To get only error notifications, set eventSeverity to error. Many more customizations are possible as described in the Flux docs.
Step 3: Deploy & Done
The ideal way to create the provider & alert in your cluster would be to commit them to your Flux Git repo & let Flux sync them over. But if you’re just testing stuff out, you may create these objects using kubectl apply.
As soon as these are created in your cluster, Flux notifications should start flowing to your Teams channel. If something seems wrong, check flux logs for any errors.
About the Author ✍🏻
Harish KM is a Principal DevOps Engineer at QloudX & a top-ranked AWS Ambassador since 2020. 👨🏻💻
With over a decade of industry experience as everything from a full-stack engineer to a cloud architect, Harish has built many world-class solutions for clients around the world! 👷🏻♂️
With over 20 certifications in cloud (AWS, Azure, GCP), containers (Kubernetes, Docker) & DevOps (Terraform, Ansible, Jenkins), Harish is an expert in a multitude of technologies. 📚
These days, his focus is on the fascinating world of DevOps & how it can transform the way we do things! 🚀
Privacy & Cookies Policy
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.