kubealerta is a Kubernetes plugin/operator designed to streamline notifications to Teams channels based on filtered resources. Please note that the project is currently under construction, and we are actively working on enhancing its features.
Note
Currently, kubealerta is configured to send notifications specifically for nodes..
Follow these steps to deploy kubealerta in your Kubernetes cluster:
- Download the manifest file from here.
- Deploy the manifest file in your Kubernetes cluster using the following command:
kubectl apply -f manifest.yamlThe manifest will create:
- Namespace
- ServiceAccount
- ClusterRole
- ClusterRoleBinding
- Deployment
- CRDs
Here, it will deploy 3 types of CRDs:
-
Notify:
- To add Teams links, use the following example YAML:
apiVersion: kubealerta.io/v1 kind: Notify metadata: name: example-notify namespace: kubealerta labels: test: sk-01 spec: webhookURL: "https://teams.webhook.url"
- To add Teams links, use the following example YAML:
-
NamespacedFilter:
- Specify the resources you want to get notified about (e.g., pod, deployment, daemonset). Follow the example YAML:
apiVersion: kubealerta.io/v1 kind: NamespacedFilter metadata: name: filter2 namespace: kubealerta labels: test: sk-02 spec: resource: Deployment rNames: - docker-dind-deployment namespaces: - sample
- Specify the resources you want to get notified about (e.g., pod, deployment, daemonset). Follow the example YAML:
-
ClusterFilter:
- Specify cluster-level resources you want to get notified about (e.g., Nodes). Follow the example YAML:
apiVersion: kubealerta.io/v1 kind: ClusterFilter metadata: name: node-alert namespace: kubealerta labels: test: sk-01 spec: resource: Nodes nodesNames: - aks-agent1pool
- Specify cluster-level resources you want to get notified about (e.g., Nodes). Follow the example YAML:
NOTE:
- The
notifyCRD is mandatory to create. - When creating a CRD with
clusterfilterornamespacedfilter, the labels you use should match with thenotifyyou are going to create. For example:- If you have created a
namespacedfilter(sample-01) with labelsapp: nginx, then use the same labels for thenotifyCRD (notify-01) to establish a connection. - Labels in sample-01 should not match with sample-02.
- Create all the resources in "kubealerta" Namespace only.
- If you have created a
This project is licensed under the MIT License - see the LICENSE file for details...